Closed Aisuma closed 3 years ago
Hi, sorry for the late reply.
To manage which prefixes can be used for your bot's commands, you have to create a custom command config class, like this:
public class ExampleCommandConfig implements CommandConfig {
@NotNull
private final List<String> commandPrefixes = new CopyOnWriteArrayList<>(new String[] {"e!"});
@NotNull
@Override
public List<String> getCommandPrefixes() {
return commandPrefixes;
}
}
and then using it when creating your CommandManager:
JavacordCommandManager commandManager = new JavacordOptions().configProvider(new ExampleCommandConfig()).create( [DiscordApi instance here] );
I'll also immediately add this to the project's wiki, sorry for the inconvenience. Hope this helps!
Hi, I've just added this to my bot project with Gradle, I have experience using ACF for Minecraft server's but never on anything else, I'm not sure of how to set the prefix and I can't find it anywhere, making my commands useless at the moment.