use of com.freya02.botcommands.api.prefixed.annotations.Description in project BotCommands by freya022.
the class EnableInfoCommand method execute.
@JDATextCommand(name = "enableinfocommand", description = "Enables the /info command")
public void execute(CommandEvent event) {
if (event.getMember().canInteract(event.getGuild().getSelfMember())) {
final BasicSettingsProvider settingsProvider = (BasicSettingsProvider) event.getContext().getSettingsProvider();
if (settingsProvider == null) {
event.indicateError("No settings provider has been set").queue();
return;
}
settingsProvider.addCommand(event.getGuild(), "info");
event.reactSuccess().queue();
} else {
event.indicateError("You cannot do this").queue();
}
}
Aggregations