Quick Start Guide¶
Entrypoint¶
This is the easiest way of starting JDA-Commands. Besides your JDA
(or ShardManager
) instance, we also need a class
of the classpath to scan for interactions.
You can also pass specific packages to exclusively scan:
Builder¶
Some features of JDA-Commands require additional settings. While we provide default values for them, you can also start JDA-Commands using a builder to fine tune some settings:
Defining Interactions¶
You define interactions as methods. They are made up from the method annotations and in some cases the method signature, e.g.
for command options.
These methods must be contained in a class annotated with @Interaction
.
@Interaction
public class HelloWorld {
@SlashCommand("greet")
public void onCommand(CommandEvent event) {
event.reply("Hello World!");
}
}
The following interaction types are available:
You can read more about the different interaction types here.