Skip to content

v3.0.0-alpha.17 | Improved Spring support, text/app command switch and command update logs

Compare
Choose a tag to compare
@freya022 freya022 released this 28 Jul 21:58
· 204 commits to 3.X since this release
14f74de

JDA version

Overview

Improved Spring support, added text/application command switches and improved application command update logs.

Add Spring auto configuration (#190)

You no longer need to use the annotation, nor be forced to make a meta-annotation to prevent annotation overriding.

Simply adding the library to your project will load it,
you can avoid running it with the exclude value of your @SpringBootApplication.

Add Spring configuration metadata (#188)

You can now benefit from autocomplete and hints in your application.properties/application.yaml.

If you're interested in how that's done: Annotation processor

Breaking changes

  • Renamed botcommands.database.queryLogThresholdMillis to botcommands.database.queryLogThreshold
  • Changed how maps are read from properties
    • Use the standard format, [property key].[map key]=[map value]
    • Affects botcommands.application.localizations

Additions

Fixes

  • Fix configuring botcommands.text.dmClosedEmoji

Deprecations

  • Deprecated @EnableBotCommands
    • Remove it and it works.

Add switches to disable application / text commands (#186)

At least you have the choice to not use them, right?

Additions

  • Added an enable properties to BApplicationConfig and BTextConfig, as well as their Spring properties.
  • Added @RequireApplicationCommands and @RequireTextCommands, you can use these to disable services that depend on them.

Improve command diff and their logs (#191)

The new application command diff engine will give you more accurate details over what changed on your application commands.

The new engine is used by default, and will log the differences if TRACE logs are enabled for io.github.freya022.botcommands.internal.commands.application.diff.DiffLogger
or any package it is in.

Deprecations

  • BDebugConfig#enableApplicationDiffsLogs
    • Only used for the old diff engine

Changes

  • New application command diff engine by default
    • Only logs what changed, with more accuracy, logs on TRACE

Additions

  • BApplicationConfig#diffEngine
    • Lets you switch back in case there's a bug
  • BApplicationConfig#logApplicationCommandData
    • Logs the raw JSON when commands needs to be updated

Deprecations

Configuration

  • Deprecated BDebugConfig#enabledMissingLocalizationLogs
    • Replaced by BApplicationConfig#logMissingLocalizationKeys
  • Deprecated BDebugConfig
  • Deprecated BComponentsConfig#useComponents
    • Renamed to BComponentsConfig#enable

Fixes

Spring configuration

  • Fixed default configs being returned with manual getters (such as from BContext or BConfig)

Text commands

  • Fixed help command being disabled if another Spring bean was declared but disabled

Application commands

  • Fix global commands always updating

Don't hesitate to check out the changelogs and the wiki.

Full Changelog: v3.0.0-alpha.16...v3.0.0-alpha.17