OrdinalBot-API is a framework similar to Spigot, designed to enable the creation of plugins for Discord bots.
Current Version: 0.1.0
- Create custom modules for your Bot.
- Simplified API similar to Spigot.
- Create customs / commands and use JDAListener
- Download the library from the releases page and place it in the
libs
directory of your project. - Add the library to your local dependency manager.
Add the following to your build.gradle
:
repositories {
mavenCentral()
}
dependencies {
implementation(fileTree("/libs"))
}
Create a plugin.json
in your resources directory:
{
"name": "Module Test",
"main": "fr.ordinalteam.moduletest.Main",
"version": "1.0.0",
"author": "Arinonia"
}
Implement your main class:
public class Main extends Plugin {
@Override
public void onEnable() {
this.logger.log("Registering test module");
}
}
Register commands and listeners:
public class Main extends Plugin {
@Override
public void onEnable() {
this.logger.log("Registering test module");
this.getJDAListenerManager().registerJDAListener(new YourListenerAdapter());
this.getCommandRegistry().registerCommand(new YourCommand(), this);
}
}
public class YourListenerAdapter extends ListenerAdapter {
// Your listeners
}
public class YourCommand extends Command {
public YourCommand() {
super("test", "!test <@user> to tag user");
}
@Override
public void onCommand(final SlashCommandInteractionEvent event) {
// Command logic
}
}
Feel free to submit issues and pull requests. For suggestions and discussions, join our Discord server.
This project is licensed under the GPLv3 License - see the LICENSE file for details.
For more information, visit our Website.