BotCommands
BotCommands copied to clipboard
Add structures to support hot restarting
Deprecations
- Deprecated
BotCommands#create(<configuration block>)- Added an overload accepting the arguments of the main method
- Deprecated
JDAConfiguration.DevTools- Replaced with
shutdownTimeoutinBConfig, which applies to the entire framework's shutdown
- Replaced with
New Features
- Added
BContext#shutdown - Added
BContext#shutdownNow - Added
BContext#awaitShutdown - Added
SHUTTING_DOWNandSHUTDOWNinBContext.Status - Added
BConfig#enableShutdownHook - Added
BConfig#shutdownTimeout - Added
BConfig#args- Not directly configurable, passed in the entry point or retrieved from Spring
- Added
BRestartConfig - Added
BShutdownEvent - Added
ApplicationStartListener- Will most likely be only used by the restarter module
Changes
- Made internal coroutine dispatchers use daemon threads
- So the JVM can exit if the bot is shut down (assuming the user does not create more non-daemon threads)
- Moved
RequiresDefaultInjectionto the API - Added
isDaemontonamedDefaultScope, defaults tofalse(compatible)
To do
- [ ] Don't activate outside of development environments
- [ ] Fix trying to access JDA from a closed Spring
ApplicationContexton shutdown - [ ] Have the JDA cache not have a bajillion gotchas
- [ ] Docs
- [ ] Fix resource leaks, if any (threads, classes referencing old restart class loaders)
- [ ] Fix all TODOs