1
0
forked from Fascinated/Bat

add auto roles and clean up how embeds are made

This commit is contained in:
Lee
2024-06-25 13:55:54 +01:00
parent 679143c331
commit 0d1eb3089a
29 changed files with 577 additions and 106 deletions

@ -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();
}
}
}