From c843d2cd6178f4a913492d06a2e6ceb0cfed4469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Wed, 28 Dec 2022 05:34:23 +0100 Subject: [PATCH] Update instructions order when registering listeners --- src/main/java/wtf/beatrice/hidekobot/HidekoBot.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java b/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java index 3cf42ec..43794c0 100644 --- a/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java +++ b/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java @@ -133,8 +133,6 @@ public class HidekoBot slashCommandListener.registerCommand(new TimeoutCommand()); slashCommandListener.registerCommand(new TriviaCommand()); slashCommandListener.registerCommand(new UrbanDictionaryCommand()); - Cache.setSlashCommandListener(slashCommandListener); - Cache.setSlashCommandCompletionListener(slashCommandCompletionListener); // register message commands 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.TriviaCommand()); messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.UrbanDictionaryCommand()); - Cache.setMessageCommandListener(messageCommandListener); // register listeners + Cache.setSlashCommandListener(slashCommandListener); + Cache.setSlashCommandCompletionListener(slashCommandCompletionListener); + Cache.setMessageCommandListener(messageCommandListener); jda.addEventListener(messageCommandListener); jda.addEventListener(slashCommandListener); jda.addEventListener(slashCommandCompletionListener);