WIP
This project uses JDA by Austin Keener.
More information coming soon!
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependecies>
<dependency>
<groupId>com.github.jonafaust</groupId>
<artifactId>jda-boot</artifactId>
<version>alpha.2</version>
</dependency>
</dependecies>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.jonafaust:jda-boot:alpha.2.3'
}
โ = Implemented, ๐ง = Work in Progress, โ = ToDo
- โ Commands
- โ Option Commands
- โ Events
- โ Embeds
- โ Variable System
- โ internationalization (i18n)
- ๐ง Config System
- โ Other Interactions (Buttons, Select Menus, Modals)
- โ Database ORM System
- โ Scheduler System
- โ Configuration Classes
- โ Music Implementation (LavaPlayer)
public class MyBot {
public static void main(String[] args) {
JdaBoot.run(MyBot.class);
}
}
Note that you need a discord.token property in your config.properties file.
@Command(name = "ping", description = "Pong!")
public class PingCommand implements SimpleCommand {
@Override
public void onCommand(CommandContext ctx) {
ctx.reply("Pong!");
}
}
@Command(name = "echo", description = "Echoes a message")
public class EchoCommand implements OptionCommand {
@Override
SlashCommandData onEnable(SlashCommandData data) {
data.addOption(OptionType.STRING, "message", "The message to echo", true);
return data;
}
@Override
public void onCommand(CommandContext ctx) {
String message = ctx.getOption("message").getAsString();
ctx.reply(message);
}
}
public class ReadyListener {
@EventHandler
public void onReady(ReadyEvent event) {
System.out.println("Bot is ready!");
}
}
Note The method must be public and have only single parameter of the event you want to listen for. The name of the method doesn't matter. The class need to have a public no-args constructor.