forked from Fascinated/Bat
add auto roles and clean up how embeds are made
This commit is contained in:
@ -4,6 +4,7 @@ import cc.fascinated.bat.command.BatCommand;
|
||||
import cc.fascinated.bat.command.BatSubCommand;
|
||||
import cc.fascinated.bat.command.impl.PingCommand;
|
||||
import cc.fascinated.bat.common.EmbedUtils;
|
||||
import cc.fascinated.bat.features.autorole.command.AutoRoleCommand;
|
||||
import cc.fascinated.bat.features.scoresaber.command.numberone.NumberOneFeedCommand;
|
||||
import cc.fascinated.bat.features.scoresaber.command.scoresaber.ScoreSaberCommand;
|
||||
import cc.fascinated.bat.features.scoresaber.command.userfeed.UserFeedCommand;
|
||||
@ -56,6 +57,7 @@ public class CommandService extends ListenerAdapter {
|
||||
// Guild commands
|
||||
registerCommand(context.getBean(UserFeedCommand.class));
|
||||
registerCommand(context.getBean(NumberOneFeedCommand.class));
|
||||
registerCommand(context.getBean(AutoRoleCommand.class));
|
||||
|
||||
// Global commands
|
||||
registerCommand(context.getBean(ScoreSaberCommand.class));
|
||||
@ -127,8 +129,10 @@ public class CommandService extends ListenerAdapter {
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("An error occurred while executing command \"{}\"", commandName, ex);
|
||||
event.replyEmbeds(EmbedUtils.buildErrorEmbed("An error occurred while executing the command\n\n" +
|
||||
ex.getLocalizedMessage()).build()).queue();
|
||||
|
||||
event.replyEmbeds(EmbedUtils.buildSuccessEmbed()
|
||||
.setDescription("An error occurred while executing the command\n\n" + ex.getLocalizedMessage())
|
||||
.build()).queue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user