Update instructions order when registering listeners
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Bea 2022-12-28 05:34:23 +01:00
parent 3bd09d2867
commit c843d2cd61

View File

@ -133,8 +133,6 @@ public class HidekoBot
slashCommandListener.registerCommand(new TimeoutCommand()); slashCommandListener.registerCommand(new TimeoutCommand());
slashCommandListener.registerCommand(new TriviaCommand()); slashCommandListener.registerCommand(new TriviaCommand());
slashCommandListener.registerCommand(new UrbanDictionaryCommand()); slashCommandListener.registerCommand(new UrbanDictionaryCommand());
Cache.setSlashCommandListener(slashCommandListener);
Cache.setSlashCommandCompletionListener(slashCommandCompletionListener);
// register message commands // register message commands
MessageCommandListener messageCommandListener = new MessageCommandListener(); MessageCommandListener messageCommandListener = new MessageCommandListener();
@ -156,9 +154,11 @@ public class HidekoBot
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TimeoutCommand()); messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TimeoutCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TriviaCommand()); messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TriviaCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.UrbanDictionaryCommand()); messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.UrbanDictionaryCommand());
Cache.setMessageCommandListener(messageCommandListener);
// register listeners // register listeners
Cache.setSlashCommandListener(slashCommandListener);
Cache.setSlashCommandCompletionListener(slashCommandCompletionListener);
Cache.setMessageCommandListener(messageCommandListener);
jda.addEventListener(messageCommandListener); jda.addEventListener(messageCommandListener);
jda.addEventListener(slashCommandListener); jda.addEventListener(slashCommandListener);
jda.addEventListener(slashCommandCompletionListener); jda.addEventListener(slashCommandCompletionListener);