-
-
Notifications
You must be signed in to change notification settings - Fork 2
Command
Gellért Dániel edited this page Apr 4, 2023
·
10 revisions
JCommands using the built-in command system of Discord called Application Commands with Javacord's implementation.
Commands usage can be limited by the following aspects:
- Places like servers or private message
- Various permissions
- Arguments with various validations
Events has to be attached to the DiscordApi
that is provided by Javacord. To attach listeners to the API CommandHandler#setApi(DiscordApi)
static method has to be called.
For example:
DiscordApi api = new DiscordApiBuilder()
.setToken("TOKEN_HERE")
.setAllIntents()
.login()
.join();
CommandHandler.setApi(api);