From 47bd16fd13ca3617f70d6256b3f19a301bec2136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Sat, 24 Dec 2022 14:48:17 +0100 Subject: [PATCH] Fix missing JSON dependency --- pom.xml | 6 ++++++ .../wtf/beatrice/hidekobot/commands/base/DiceRoll.java | 2 +- .../hidekobot/commands/message/DiceRollCommand.java | 4 +++- .../hidekobot/commands/message/TriviaCommand.java | 6 ++++-- .../hidekobot/commands/slash/DiceRollCommand.java | 3 --- .../hidekobot/listeners/ButtonInteractionListener.java | 2 +- .../wtf/beatrice/hidekobot/objects/MessageResponse.java | 1 - .../objects/comparators/TriviaCategoryComparator.java | 1 - .../beatrice/hidekobot/runnables/ExpiredMessageTask.java | 9 --------- .../wtf/beatrice/hidekobot/runnables/TriviaTask.java | 4 ++-- 10 files changed, 17 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index 51893db..be7cba0 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,12 @@ commons-text 1.10.0 + + org.json + json + 20220924 + + diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/base/DiceRoll.java b/src/main/java/wtf/beatrice/hidekobot/commands/base/DiceRoll.java index ff257b9..aff4c34 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/base/DiceRoll.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/base/DiceRoll.java @@ -3,8 +3,8 @@ package wtf.beatrice.hidekobot.commands.base; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.User; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.objects.fun.Dice; import wtf.beatrice.hidekobot.objects.MessageResponse; +import wtf.beatrice.hidekobot.objects.fun.Dice; import java.util.LinkedHashMap; import java.util.LinkedList; diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java index d4ef0a2..cf1f672 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java @@ -9,7 +9,9 @@ import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.commands.CommandCategory; import wtf.beatrice.hidekobot.objects.commands.MessageCommand; -import java.util.*; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; public class DiceRollCommand implements MessageCommand { diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/message/TriviaCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/message/TriviaCommand.java index af5e2da..38f2b83 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/message/TriviaCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/message/TriviaCommand.java @@ -8,12 +8,14 @@ import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import wtf.beatrice.hidekobot.Cache; +import wtf.beatrice.hidekobot.commands.base.Trivia; import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.commands.CommandCategory; import wtf.beatrice.hidekobot.objects.commands.MessageCommand; -import wtf.beatrice.hidekobot.commands.base.Trivia; -import java.util.*; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; import java.util.concurrent.TimeUnit; public class TriviaCommand implements MessageCommand diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/slash/DiceRollCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/slash/DiceRollCommand.java index c3e4c46..a8f447d 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/slash/DiceRollCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/slash/DiceRollCommand.java @@ -1,15 +1,12 @@ package wtf.beatrice.hidekobot.commands.slash; -import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; -import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions; import net.dv8tion.jda.api.interactions.commands.OptionMapping; 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.commands.base.DiceRoll; -import wtf.beatrice.hidekobot.commands.base.Say; import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; diff --git a/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java b/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java index 56acde8..7a46038 100644 --- a/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java +++ b/src/main/java/wtf/beatrice/hidekobot/listeners/ButtonInteractionListener.java @@ -3,9 +3,9 @@ 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.base.CoinFlip; +import wtf.beatrice.hidekobot.commands.base.Trivia; import wtf.beatrice.hidekobot.commands.base.UrbanDictionary; import wtf.beatrice.hidekobot.util.CommandUtil; -import wtf.beatrice.hidekobot.commands.base.Trivia; public class ButtonInteractionListener extends ListenerAdapter { diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java b/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java index ae95850..ec3f28c 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java @@ -1,7 +1,6 @@ package wtf.beatrice.hidekobot.objects; import net.dv8tion.jda.api.entities.MessageEmbed; -import net.dv8tion.jda.api.interactions.components.ActionRow; import net.dv8tion.jda.api.interactions.components.ItemComponent; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/comparators/TriviaCategoryComparator.java b/src/main/java/wtf/beatrice/hidekobot/objects/comparators/TriviaCategoryComparator.java index 33a8d0d..3e77fea 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/comparators/TriviaCategoryComparator.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/comparators/TriviaCategoryComparator.java @@ -1,7 +1,6 @@ package wtf.beatrice.hidekobot.objects.comparators; import wtf.beatrice.hidekobot.objects.fun.TriviaCategory; -import wtf.beatrice.hidekobot.objects.fun.TriviaScore; import java.util.Comparator; diff --git a/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java b/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java index 42eae02..4196072 100644 --- a/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java +++ b/src/main/java/wtf/beatrice/hidekobot/runnables/ExpiredMessageTask.java @@ -1,21 +1,12 @@ package wtf.beatrice.hidekobot.runnables; -import net.dv8tion.jda.api.entities.Guild; -import net.dv8tion.jda.api.entities.Message; -import net.dv8tion.jda.api.entities.User; -import net.dv8tion.jda.api.entities.channel.ChannelType; -import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; -import net.dv8tion.jda.api.interactions.components.LayoutComponent; -import net.dv8tion.jda.api.requests.RestAction; import wtf.beatrice.hidekobot.Cache; -import wtf.beatrice.hidekobot.HidekoBot; import wtf.beatrice.hidekobot.datasources.DatabaseSource; import wtf.beatrice.hidekobot.util.CommandUtil; import wtf.beatrice.hidekobot.util.Logger; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; import java.util.List; public class ExpiredMessageTask implements Runnable { diff --git a/src/main/java/wtf/beatrice/hidekobot/runnables/TriviaTask.java b/src/main/java/wtf/beatrice/hidekobot/runnables/TriviaTask.java index d0bb6b5..82382fb 100644 --- a/src/main/java/wtf/beatrice/hidekobot/runnables/TriviaTask.java +++ b/src/main/java/wtf/beatrice/hidekobot/runnables/TriviaTask.java @@ -8,12 +8,12 @@ import net.dv8tion.jda.api.entities.emoji.Emoji; import net.dv8tion.jda.api.interactions.components.buttons.Button; import org.json.JSONObject; import wtf.beatrice.hidekobot.Cache; +import wtf.beatrice.hidekobot.commands.base.Trivia; +import wtf.beatrice.hidekobot.objects.comparators.TriviaScoreComparator; import wtf.beatrice.hidekobot.objects.fun.TriviaCategory; import wtf.beatrice.hidekobot.objects.fun.TriviaQuestion; import wtf.beatrice.hidekobot.objects.fun.TriviaScore; -import wtf.beatrice.hidekobot.objects.comparators.TriviaScoreComparator; import wtf.beatrice.hidekobot.util.CommandUtil; -import wtf.beatrice.hidekobot.commands.base.Trivia; import java.util.*; import java.util.concurrent.ScheduledFuture;