From 656dff4b26fa5ef69d5c327a5e04cdac318f2d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Tue, 22 Nov 2022 00:31:52 +0100 Subject: [PATCH] Refactor packages --- src/main/java/wtf/beatrice/hidekobot/Cache.java | 2 +- src/main/java/wtf/beatrice/hidekobot/HidekoBot.java | 4 ++-- .../wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java | 2 +- .../beatrice/hidekobot/commands/slash/CoinFlipCommand.java | 2 +- .../beatrice/hidekobot/datasource/ConfigurationSource.java | 2 +- .../wtf/beatrice/hidekobot/datasource/DatabaseSource.java | 2 +- .../wtf/beatrice/hidekobot/listeners/MessageListener.java | 2 +- .../java/wtf/beatrice/hidekobot/listeners/MessageLogger.java | 2 +- .../wtf/beatrice/hidekobot/runnables/CommandsUpdateTask.java | 2 +- .../wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java | 2 +- .../java/wtf/beatrice/hidekobot/runnables/HeartBeatTask.java | 2 +- .../wtf/beatrice/hidekobot/{utils => util}/FormatUtil.java | 2 +- .../java/wtf/beatrice/hidekobot/{utils => util}/Logger.java | 2 +- .../wtf/beatrice/hidekobot/{utils => util}/RandomUtil.java | 2 +- .../beatrice/hidekobot/{utils => util}/SlashCommandUtil.java | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) rename src/main/java/wtf/beatrice/hidekobot/{utils => util}/FormatUtil.java (97%) rename src/main/java/wtf/beatrice/hidekobot/{utils => util}/Logger.java (98%) rename src/main/java/wtf/beatrice/hidekobot/{utils => util}/RandomUtil.java (96%) rename src/main/java/wtf/beatrice/hidekobot/{utils => util}/SlashCommandUtil.java (99%) diff --git a/src/main/java/wtf/beatrice/hidekobot/Cache.java b/src/main/java/wtf/beatrice/hidekobot/Cache.java index 8930c1e..38d8ef4 100644 --- a/src/main/java/wtf/beatrice/hidekobot/Cache.java +++ b/src/main/java/wtf/beatrice/hidekobot/Cache.java @@ -5,7 +5,7 @@ import org.jetbrains.annotations.Nullable; import wtf.beatrice.hidekobot.datasource.DatabaseSource; import wtf.beatrice.hidekobot.listeners.MessageLogger; import wtf.beatrice.hidekobot.datasource.ConfigurationSource; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; import java.awt.*; import java.lang.reflect.Field; diff --git a/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java b/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java index 45eb304..3b6cbb6 100644 --- a/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java +++ b/src/main/java/wtf/beatrice/hidekobot/HidekoBot.java @@ -15,8 +15,8 @@ import wtf.beatrice.hidekobot.runnables.CommandsUpdateTask; import wtf.beatrice.hidekobot.runnables.ExpiredMessageTask; import wtf.beatrice.hidekobot.runnables.HeartBeatTask; import wtf.beatrice.hidekobot.datasource.ConfigurationSource; -import wtf.beatrice.hidekobot.utils.Logger; -import wtf.beatrice.hidekobot.utils.SlashCommandUtil; +import wtf.beatrice.hidekobot.util.Logger; +import wtf.beatrice.hidekobot.util.SlashCommandUtil; import java.io.File; import java.time.LocalDateTime; 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 241dc28..15b45f9 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/BotInfoCommand.java @@ -6,7 +6,7 @@ import net.dv8tion.jda.api.interactions.commands.Command; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.utils.FormatUtil; +import wtf.beatrice.hidekobot.util.FormatUtil; import java.lang.management.ManagementFactory; import java.text.DecimalFormat; 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 c4dc345..e629ccc 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/CoinFlipCommand.java @@ -9,7 +9,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.utils.RandomUtil; +import wtf.beatrice.hidekobot.util.RandomUtil; import java.util.List; diff --git a/src/main/java/wtf/beatrice/hidekobot/datasource/ConfigurationSource.java b/src/main/java/wtf/beatrice/hidekobot/datasource/ConfigurationSource.java index a8aee90..9b9d1c2 100644 --- a/src/main/java/wtf/beatrice/hidekobot/datasource/ConfigurationSource.java +++ b/src/main/java/wtf/beatrice/hidekobot/datasource/ConfigurationSource.java @@ -3,7 +3,7 @@ package wtf.beatrice.hidekobot.datasource; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; import java.io.*; import java.util.LinkedHashMap; diff --git a/src/main/java/wtf/beatrice/hidekobot/datasource/DatabaseSource.java b/src/main/java/wtf/beatrice/hidekobot/datasource/DatabaseSource.java index 19d024f..a7783f4 100644 --- a/src/main/java/wtf/beatrice/hidekobot/datasource/DatabaseSource.java +++ b/src/main/java/wtf/beatrice/hidekobot/datasource/DatabaseSource.java @@ -4,7 +4,7 @@ import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.channel.ChannelType; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; import java.sql.*; import java.time.LocalDateTime; diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageListener.java index 18b6010..8720aa2 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageListener.java @@ -5,7 +5,7 @@ import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import org.jetbrains.annotations.NotNull; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; public class MessageListener extends ListenerAdapter { diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageLogger.java b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageLogger.java index 380e908..84db285 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/MessageLogger.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/MessageLogger.java @@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import org.jetbrains.annotations.NotNull; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; public class MessageLogger extends ListenerAdapter { diff --git a/src/main/java/wtf/beatrice/hidekobot/runnables/CommandsUpdateTask.java b/src/main/java/wtf/beatrice/hidekobot/runnables/CommandsUpdateTask.java index 026c42a..661827b 100644 --- a/src/main/java/wtf/beatrice/hidekobot/runnables/CommandsUpdateTask.java +++ b/src/main/java/wtf/beatrice/hidekobot/runnables/CommandsUpdateTask.java @@ -3,7 +3,7 @@ package wtf.beatrice.hidekobot.runnables; import net.dv8tion.jda.api.JDA; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; public class CommandsUpdateTask implements Runnable { diff --git a/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java b/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java index 93f0b6e..946ff62 100644 --- a/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java +++ b/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java @@ -10,7 +10,7 @@ import net.dv8tion.jda.api.requests.RestAction; import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.HidekoBot; import wtf.beatrice.hidekobot.datasource.DatabaseSource; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/wtf/beatrice/hidekobot/runnables/HeartBeatTask.java b/src/main/java/wtf/beatrice/hidekobot/runnables/HeartBeatTask.java index c073792..b3855a8 100644 --- a/src/main/java/wtf/beatrice/hidekobot/runnables/HeartBeatTask.java +++ b/src/main/java/wtf/beatrice/hidekobot/runnables/HeartBeatTask.java @@ -1,7 +1,7 @@ package wtf.beatrice.hidekobot.runnables; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.utils.Logger; +import wtf.beatrice.hidekobot.util.Logger; import java.io.IOException; import java.net.HttpURLConnection; diff --git a/src/main/java/wtf/beatrice/hidekobot/utils/FormatUtil.java b/src/main/java/wtf/beatrice/hidekobot/util/FormatUtil.java similarity index 97% rename from src/main/java/wtf/beatrice/hidekobot/utils/FormatUtil.java rename to src/main/java/wtf/beatrice/hidekobot/util/FormatUtil.java index dcb9e23..1c9a11e 100644 --- a/src/main/java/wtf/beatrice/hidekobot/utils/FormatUtil.java +++ b/src/main/java/wtf/beatrice/hidekobot/util/FormatUtil.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.utils; +package wtf.beatrice.hidekobot.util; import wtf.beatrice.hidekobot.Cache; diff --git a/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java b/src/main/java/wtf/beatrice/hidekobot/util/Logger.java similarity index 98% rename from src/main/java/wtf/beatrice/hidekobot/utils/Logger.java rename to src/main/java/wtf/beatrice/hidekobot/util/Logger.java index 55bbf6c..eb0b7e1 100644 --- a/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java +++ b/src/main/java/wtf/beatrice/hidekobot/util/Logger.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.utils; +package wtf.beatrice.hidekobot.util; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/wtf/beatrice/hidekobot/utils/RandomUtil.java b/src/main/java/wtf/beatrice/hidekobot/util/RandomUtil.java similarity index 96% rename from src/main/java/wtf/beatrice/hidekobot/utils/RandomUtil.java rename to src/main/java/wtf/beatrice/hidekobot/util/RandomUtil.java index d8de632..f9dec08 100644 --- a/src/main/java/wtf/beatrice/hidekobot/utils/RandomUtil.java +++ b/src/main/java/wtf/beatrice/hidekobot/util/RandomUtil.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.utils; +package wtf.beatrice.hidekobot.util; import java.util.Random; diff --git a/src/main/java/wtf/beatrice/hidekobot/utils/SlashCommandUtil.java b/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java similarity index 99% rename from src/main/java/wtf/beatrice/hidekobot/utils/SlashCommandUtil.java rename to src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java index e12cee0..9646c2a 100644 --- a/src/main/java/wtf/beatrice/hidekobot/utils/SlashCommandUtil.java +++ b/src/main/java/wtf/beatrice/hidekobot/util/SlashCommandUtil.java @@ -1,4 +1,4 @@ -package wtf.beatrice.hidekobot.utils; +package wtf.beatrice.hidekobot.util; import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.Permission;