v3.0.0-alpha.17 | Improved Spring support, text/app command switch and command update logs
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
tobotcommands.database.queryLogThreshold
- Uses Java's
Duration
, Spring supports the ISO-8601 format, a simplified format or milliseconds
- Uses Java's
- Changed how maps are read from properties
- Use the standard format,
[property key].[map key]=[map value]
- Affects
botcommands.application.localizations
- Use the standard format,
Additions
- Added metadata for Spring configuration properties (More info)
- Note: Description is a copy of the docs due to https://youtrack.jetbrains.com/issue/IDEA-356678
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 toBApplicationConfig
andBTextConfig
, 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
- Only logs what changed, with more accuracy, logs on
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
- Replaced by
- Deprecated
BDebugConfig
- Deprecated
BComponentsConfig#useComponents
- Renamed to
BComponentsConfig#enable
- Renamed to
Fixes
Spring configuration
- Fixed default configs being returned with manual getters (such as from
BContext
orBConfig
)
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