This is a small bot intended for use on the Together Java discord server.
We will see whether it evolves, but it will likely only handle smaller tasks for now.
- JDA
- Discord API
- TOML4J
- A Java implementation of the TOML config language
- Brigardier
- Mojang's Minecraft command parser
- Logback and SLF4J
- Logging
Some mayb Junit5 might join that list…
You are welcome to raise issues or suggestions in the issue tracker here. PRs are welcome too :)
- Make a new class in the
org.togetherjava.command.commands
package. All classes in that package are automatically registered at runtime. - Make sure the class has a constructor that takes no arguments!
- Implement the mandated method:
public LiteralCommandNode<CommandSource> getCommand(CommandDispatcher<CommandSource> dispatcher) {
- Build your command in there. Here is the echo command, which might serve as an example:
@Override public LiteralCommandNode<CommandSource> getCommand(CommandDispatcher<CommandSource> dispatcher) { return CommandGenericHelper.literal("echo") .then( CommandGenericHelper.argument("message", StringArgumentType.greedyString()) .executes(context -> { CommandSource source = context.getSource(); String argument = context.getArgument("message", String.class); source.getMessageSender() .sendMessage(SimpleMessage.information(argument), source.getChannel()); return 0; }) ) .build(); }
- For more infomation on adding commands, refer to the documentation for Brigardier or ask :)
- Role assignment via reactions
- Rep? Maybe give/remove via a given emoji?