Closed Saladoc closed 1 year ago
Something changed in Quarkus version 2.14. This means that command-framework v0.4.0 can be used with quarkus 2.14 and higher. I couldn't identify the specific change responsible for the new behavior, only the version from which onward the problem no longer existed.
Oh and another note: Quarkus 3.0.0 (currently in alpha) switches over to the jakarta annotations, so it's compatible with nk:cf v0.5.0
Note: Not applicable for v0.5.0 since quarkus uses CDI 2
Demo Project: https://github.com/Saladoc/quarkus-command-test
How to run the demo: Use the application.yml file to enable / disable commands, provide bot token either in application.yml or as a "-Dbot.token=your_token_here" argument in the run configuration.
The demo project creates a simple javacord bot, registering two commands. One is configured via annotations, making use of the default methods on the
SlashCommandJavacord
interface, the other overrides the methods.First issue: The default implementation is unable to locate the annotations, therefore failing the registration process due to the default values not supplying a valid description, which is mandatory for slash commands:
Second issue: If the annotation command is disabled, the override-command is successfully registered. Executing it however fails, as the
BotOwnerJavacordSlash
restriction can not be verified: