From 51de18206e0afa233d1720a4decf54be78a7471d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Tue, 22 Nov 2022 00:35:10 +0100 Subject: [PATCH] Refactor clearchat class --- .../slash/{ClearChatCommand.java => ClearCommand.java} | 2 +- .../hidekobot/listeners/ButtonInteractionListener.java | 4 ++-- .../beatrice/hidekobot/listeners/SlashCommandListener.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/wtf/beatrice/hidekobot/commands/slash/{ClearChatCommand.java => ClearCommand.java} (99%) diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearChatCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java similarity index 99% rename from src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearChatCommand.java rename to src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java index f063e38..43c4792 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearChatCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java @@ -17,7 +17,7 @@ import wtf.beatrice.hidekobot.Cache; import java.util.ArrayList; import java.util.List; -public class ClearChatCommand +public class ClearCommand { public void runSlashCommand(@NotNull SlashCommandInteractionEvent event) diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java index 60ab3ff..41be8c7 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java @@ -2,7 +2,7 @@ package wtf.beatrice.hidekobot.listeners; import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; -import wtf.beatrice.hidekobot.commands.slash.ClearChatCommand; +import wtf.beatrice.hidekobot.commands.slash.ClearCommand; import wtf.beatrice.hidekobot.commands.slash.CoinFlipCommand; public class ButtonInteractionListener extends ListenerAdapter @@ -18,7 +18,7 @@ public class ButtonInteractionListener extends ListenerAdapter case "coinflip_reflip" -> new CoinFlipCommand().buttonReFlip(event); // clearchat command - case "clear_dismiss" -> new ClearChatCommand().dismissMessage(event); + case "clear_dismiss" -> new ClearCommand().dismissMessage(event); } diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java index b0c52c0..d915d60 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java @@ -14,7 +14,7 @@ public class SlashCommandListener extends ListenerAdapter switch (event.getName().toLowerCase()) { case "avatar" -> new AvatarCommand().runSlashCommand(event); case "botinfo" -> new BotInfoCommand().runSlashCommand(event); - case "clear" -> new ClearChatCommand().runSlashCommand(event); + case "clear" -> new ClearCommand().runSlashCommand(event); case "coinflip" -> new CoinFlipCommand().runSlashCommand(event); case "die" -> new DieCommand().runSlashCommand(event); case "help" -> new HelpCommand().runSlashCommand(event);