Command - S3nS3IW00/JCommands GitHub Wiki

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

First step

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);