This PR looks big, but most of it is just find+replace for JDA 5's breaking changes + updating dependencies. I also did a few miscellaneous things while I was refactoring, like simplifying the bot's application command framework and adding the coroutine event manager from jda-ktx.
Dependency changes
JDA: 4.3.0_339 -> 5.0.0-alpha.20
Notably, this adds support for threads and forum channels which closes #131
The ID of buttons are now generated with the String.generateId() extension func and are unique to each command, which removes the need for a cross-command button ID map
Added a default implementation for the execute(ButtonInteractionEvent) func so you're not required to declare it when it's unused
Added support for modal interactions through the execute(ModalInteractionEvent) func
Misc changes
Switched the event manager to jda-ktx's CoroutineEventManager (via injectKTX() on the JDA builder) for better coroutine support
Switched the blocking calls in QuoteListener to coroutines
Merged both init blocks together in AboutCommand
Moved the list of requested permissions to a dedicated variable in Main
This PR looks big, but most of it is just find+replace for JDA 5's breaking changes + updating dependencies. I also did a few miscellaneous things while I was refactoring, like simplifying the bot's application command framework and adding the coroutine event manager from jda-ktx.
Dependency changes
1223d5cbb8
(one of the last commits which supported JDA 4) -> commitfc7d7de
(latest commit which supports JDA 5)Application command framework changes (read more)
String.generateId()
extension func and are unique to each command, which removes the need for a cross-command button ID mapexecute(ButtonInteractionEvent)
func so you're not required to declare it when it's unusedexecute(ModalInteractionEvent)
funcMisc changes
CoroutineEventManager
(viainjectKTX()
on the JDA builder) for better coroutine supportQuoteListener
to coroutinesinit
blocks together inAboutCommand
Main