From 11e4a07698899a8846af1ac8963725469cec97b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Tue, 22 Nov 2022 16:41:08 +0100 Subject: [PATCH] Refactor objects package --- .../beatrice/hidekobot/commands/message/CommandsCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/message/HelloCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/AvatarCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java | 4 ++-- .../wtf/beatrice/hidekobot/commands/slash/ClearCommand.java | 2 +- .../beatrice/hidekobot/commands/slash/CoinFlipCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/DieCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/HelpCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/InviteCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/PingCommand.java | 2 +- .../wtf/beatrice/hidekobot/commands/slash/SayCommand.java | 2 +- .../beatrice/hidekobot/listeners/MessageCommandListener.java | 4 ++-- .../beatrice/hidekobot/listeners/SlashCommandListener.java | 2 +- .../hidekobot/objects/{ => commands}/MessageCommand.java | 2 +- .../hidekobot/objects/{ => commands}/SlashCommand.java | 2 +- .../hidekobot/objects/{ => commands}/SlashCommandImpl.java | 2 +- .../{ => comparators}/MessageCommandAliasesComparator.java | 2 +- .../java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) rename src/main/java/wtf/beatrice/hidekobot/objects/{ => commands}/MessageCommand.java (97%) rename src/main/java/wtf/beatrice/hidekobot/objects/{ => commands}/SlashCommand.java (94%) rename src/main/java/wtf/beatrice/hidekobot/objects/{ => commands}/SlashCommandImpl.java (92%) rename src/main/java/wtf/beatrice/hidekobot/objects/{ => comparators}/MessageCommandAliasesComparator.java (90%) diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/message/CommandsCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/message/CommandsCommand.java index c96b3c8..489db7f 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/message/CommandsCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/message/CommandsCommand.java @@ -2,7 +2,7 @@ package wtf.beatrice.hidekobot.commands.message; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.MessageCommand; +import wtf.beatrice.hidekobot.objects.commands.MessageCommand; import java.util.Collections; import java.util.LinkedList; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/message/HelloCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/message/HelloCommand.java index 0c0ea61..69ab1b0 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/message/HelloCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/message/HelloCommand.java @@ -1,7 +1,7 @@ package wtf.beatrice.hidekobot.commands.message; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; -import wtf.beatrice.hidekobot.objects.MessageCommand; +import wtf.beatrice.hidekobot.objects.commands.MessageCommand; import java.util.Arrays; import java.util.LinkedList; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/AvatarCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/AvatarCommand.java index 6094ef8..5077120 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/AvatarCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/AvatarCommand.java @@ -9,7 +9,7 @@ import net.dv8tion.jda.api.interactions.commands.build.CommandData; import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; public class AvatarCommand extends SlashCommandImpl { diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java index 973375a..82fc6ce 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java @@ -7,8 +7,8 @@ import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.objects.SlashCommand; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommand; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.util.FormatUtil; import java.lang.management.ManagementFactory; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java index 250c9d1..b319bfe 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/ClearCommand.java @@ -18,7 +18,7 @@ import net.dv8tion.jda.api.interactions.components.buttons.Button; import net.dv8tion.jda.api.requests.restaction.WebhookMessageEditAction; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java index 9ec4f75..b25f7bd 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java @@ -11,7 +11,7 @@ import net.dv8tion.jda.api.interactions.components.ActionRow; import net.dv8tion.jda.api.interactions.components.buttons.Button; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.util.RandomUtil; import java.util.List; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/DieCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/DieCommand.java index 2d05cde..e6a4895 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/DieCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/DieCommand.java @@ -7,7 +7,7 @@ import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/HelpCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/HelpCommand.java index 6f1ef76..326894c 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/HelpCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/HelpCommand.java @@ -6,7 +6,7 @@ import net.dv8tion.jda.api.interactions.commands.build.CommandData; import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; public class HelpCommand extends SlashCommandImpl { diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/InviteCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/InviteCommand.java index e50ce5c..4c712a9 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/InviteCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/InviteCommand.java @@ -13,7 +13,7 @@ import net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; public class InviteCommand extends SlashCommandImpl { diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/PingCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/PingCommand.java index d407c11..9f614d1 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/PingCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/PingCommand.java @@ -4,7 +4,7 @@ import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEve import net.dv8tion.jda.api.interactions.commands.build.CommandData; import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; public class PingCommand extends SlashCommandImpl { diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/SayCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/SayCommand.java index b5d88f2..9cd2e4b 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/SayCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/SayCommand.java @@ -9,7 +9,7 @@ import net.dv8tion.jda.api.interactions.commands.OptionType; import net.dv8tion.jda.api.interactions.commands.build.CommandData; import net.dv8tion.jda.api.interactions.commands.build.Commands; import org.jetbrains.annotations.NotNull; -import wtf.beatrice.hidekobot.objects.SlashCommandImpl; +import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; public class SayCommand extends SlashCommandImpl { diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageCommandListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageCommandListener.java index 576f483..595f2ab 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageCommandListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageCommandListener.java @@ -4,8 +4,8 @@ import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import org.jetbrains.annotations.NotNull; -import wtf.beatrice.hidekobot.objects.MessageCommand; -import wtf.beatrice.hidekobot.objects.MessageCommandAliasesComparator; +import wtf.beatrice.hidekobot.objects.commands.MessageCommand; +import wtf.beatrice.hidekobot.objects.comparators.MessageCommandAliasesComparator; import wtf.beatrice.hidekobot.util.Logger; import java.util.*; diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java index 0941ac0..6b15196 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/SlashCommandListener.java @@ -3,7 +3,7 @@ package wtf.beatrice.hidekobot.listeners; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import org.jetbrains.annotations.NotNull; -import wtf.beatrice.hidekobot.objects.SlashCommand; +import wtf.beatrice.hidekobot.objects.commands.SlashCommand; import java.util.LinkedList; import java.util.TreeMap; diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/MessageCommand.java b/src/main/java/wtf/beatrice/hidekobot/objects/commands/MessageCommand.java similarity index 97% rename from src/main/java/wtf/beatrice/hidekobot/objects/MessageCommand.java rename to src/main/java/wtf/beatrice/hidekobot/objects/commands/MessageCommand.java index efddef3..ffec1d7 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/MessageCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/commands/MessageCommand.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.objects; +package wtf.beatrice.hidekobot.objects.commands; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/SlashCommand.java b/src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommand.java similarity index 94% rename from src/main/java/wtf/beatrice/hidekobot/objects/SlashCommand.java rename to src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommand.java index defee39..dd1e855 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/SlashCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommand.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.objects; +package wtf.beatrice.hidekobot.objects.commands; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.interactions.commands.build.CommandData; diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/SlashCommandImpl.java b/src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommandImpl.java similarity index 92% rename from src/main/java/wtf/beatrice/hidekobot/objects/SlashCommandImpl.java rename to src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommandImpl.java index e2a5bfb..92bc070 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/SlashCommandImpl.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/commands/SlashCommandImpl.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.objects; +package wtf.beatrice.hidekobot.objects.commands; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.interactions.commands.build.CommandData; diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/MessageCommandAliasesComparator.java b/src/main/java/wtf/beatrice/hidekobot/objects/comparators/MessageCommandAliasesComparator.java similarity index 90% rename from src/main/java/wtf/beatrice/hidekobot/objects/MessageCommandAliasesComparator.java rename to src/main/java/wtf/beatrice/hidekobot/objects/comparators/MessageCommandAliasesComparator.java index 4624ec7..6510b19 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/MessageCommandAliasesComparator.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/comparators/MessageCommandAliasesComparator.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.objects; +package wtf.beatrice.hidekobot.objects.comparators; import java.util.Comparator; import java.util.LinkedList; diff --git a/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java b/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java index 1ef6775..696614e 100644 --- a/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java +++ b/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java @@ -6,7 +6,7 @@ import net.dv8tion.jda.api.interactions.commands.build.CommandData; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; import wtf.beatrice.hidekobot.listeners.MessageCommandListener; -import wtf.beatrice.hidekobot.objects.SlashCommand; +import wtf.beatrice.hidekobot.objects.commands.SlashCommand; import java.util.ArrayList; import java.util.List;