From 8b65fd1e01bf90c88b5bb501771d08bde9199f54 Mon Sep 17 00:00:00 2001 From: duncte123 Date: Thu, 24 Aug 2023 13:22:15 +0200 Subject: [PATCH] lint --- .../skybot/commands/essentials/WolframAlphaCommand.java | 1 - bot/src/main/java/ml/duncte123/skybot/utils/AirUtils.java | 2 -- .../ml/duncte123/skybot/commands/fun/FakeWordCommand.kt | 2 -- .../duncte123/skybot/commands/music/BassBoostCommand.kt | 6 +++--- .../ml/duncte123/skybot/commands/music/JoinCommand.kt | 1 - .../ml/duncte123/skybot/commands/music/LyricsCommand.kt | 1 - .../ml/duncte123/skybot/commands/music/StopCommand.kt | 8 +++++--- 7 files changed, 8 insertions(+), 13 deletions(-) diff --git a/bot/src/main/java/ml/duncte123/skybot/commands/essentials/WolframAlphaCommand.java b/bot/src/main/java/ml/duncte123/skybot/commands/essentials/WolframAlphaCommand.java index 7c13faaec..9e6130936 100644 --- a/bot/src/main/java/ml/duncte123/skybot/commands/essentials/WolframAlphaCommand.java +++ b/bot/src/main/java/ml/duncte123/skybot/commands/essentials/WolframAlphaCommand.java @@ -18,7 +18,6 @@ package ml.duncte123.skybot.commands.essentials; -import com.fasterxml.jackson.databind.ObjectMapper; import com.wolfram.alpha.*; import com.wolfram.alpha.visitor.Visitable; import me.duncte123.botcommons.StringUtils; diff --git a/bot/src/main/java/ml/duncte123/skybot/utils/AirUtils.java b/bot/src/main/java/ml/duncte123/skybot/utils/AirUtils.java index 3615212f6..368674a5e 100644 --- a/bot/src/main/java/ml/duncte123/skybot/utils/AirUtils.java +++ b/bot/src/main/java/ml/duncte123/skybot/utils/AirUtils.java @@ -351,8 +351,6 @@ public static PendingRequest shortenUrl(String url, Variables variables, (r) -> { final ObjectNode response = toJSONObject(r, mapper); - System.out.println(response); - if (response == null) { return "Shorten did a fucky wucky and send invalid json"; } diff --git a/bot/src/main/kotlin/ml/duncte123/skybot/commands/fun/FakeWordCommand.kt b/bot/src/main/kotlin/ml/duncte123/skybot/commands/fun/FakeWordCommand.kt index a53f43ec5..a99ea20a9 100644 --- a/bot/src/main/kotlin/ml/duncte123/skybot/commands/fun/FakeWordCommand.kt +++ b/bot/src/main/kotlin/ml/duncte123/skybot/commands/fun/FakeWordCommand.kt @@ -19,13 +19,11 @@ package ml.duncte123.skybot.commands.`fun` import com.fasterxml.jackson.databind.JsonNode -import com.github.natanbc.reliqua.limiter.RateLimiter import me.duncte123.botcommons.messaging.EmbedUtils import me.duncte123.botcommons.messaging.MessageUtils.sendEmbed import me.duncte123.botcommons.web.WebUtils import ml.duncte123.skybot.Variables import ml.duncte123.skybot.objects.SlashSupport -import ml.duncte123.skybot.objects.command.Command import ml.duncte123.skybot.objects.command.CommandCategory import ml.duncte123.skybot.objects.command.CommandContext import ml.duncte123.skybot.utils.AirUtils diff --git a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/BassBoostCommand.kt b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/BassBoostCommand.kt index f8f128c1d..2189d24c9 100644 --- a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/BassBoostCommand.kt +++ b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/BassBoostCommand.kt @@ -95,7 +95,7 @@ class BassBoostCommand : MusicCommand() { "level", "How strong should the bass boost be", true, - false, + false ) .addChoice("high", "high") .addChoice("med", "med") @@ -125,7 +125,7 @@ class BassBoostCommand : MusicCommand() { else -> { event.reply( - "(this should never happen) Unknown bassboost preset ${arg}, please choose from high/med/low/off" + "(this should never happen) Unknown bassboost preset $arg, please choose from high/med/low/off" ).queue() -1.0f } @@ -135,7 +135,7 @@ class BassBoostCommand : MusicCommand() { return } - event.reply("Set the bassboost to `${arg}`").queue() + event.reply("Set the bassboost to `$arg`").queue() setLavalinkEQ(gain, variables, event.guild!!.idLong) } } diff --git a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/JoinCommand.kt b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/JoinCommand.kt index ad025fc2d..ee16d3b4d 100644 --- a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/JoinCommand.kt +++ b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/JoinCommand.kt @@ -96,7 +96,6 @@ class JoinCommand : MusicCommand() { return } - val mng = variables.audioUtils.getMusicManager(event.guild!!.idLong) mng.latestChannelId = event.channel.idLong diff --git a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/LyricsCommand.kt b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/LyricsCommand.kt index 7e968f727..5cefa34a2 100644 --- a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/LyricsCommand.kt +++ b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/LyricsCommand.kt @@ -30,7 +30,6 @@ import ml.duncte123.skybot.objects.command.CommandContext import ml.duncte123.skybot.objects.command.MusicCommand import ml.duncte123.skybot.objects.config.DunctebotConfig import net.dv8tion.jda.api.EmbedBuilder -import net.dv8tion.jda.api.entities.MessageEmbed import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent import net.dv8tion.jda.api.interactions.commands.OptionType import net.dv8tion.jda.api.interactions.commands.build.SubcommandData diff --git a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/StopCommand.kt b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/StopCommand.kt index 594f0833b..2897c505f 100644 --- a/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/StopCommand.kt +++ b/bot/src/main/kotlin/ml/duncte123/skybot/commands/music/StopCommand.kt @@ -87,8 +87,10 @@ class StopCommand : MusicCommand() { return } - event.reply("Only the person that started this track " + - "or people with the `Manage Server` permission can stop this track\n" + - "(this behaviour can be altered in the dashboard)").queue() + event.reply( + "Only the person that started this track " + + "or people with the `Manage Server` permission can stop this track\n" + + "(this behaviour can be altered in the dashboard)" + ).queue() } }