From 80f6a2f37f1f718b291d15b9fd9fa69727f0eeb0 Mon Sep 17 00:00:00 2001 From: freya02 <41875020+freya022@users.noreply.github.com> Date: Fri, 16 Sep 2022 22:32:26 +0200 Subject: [PATCH] Examples - Update to JDA alpha 19 --- examples/pom.xml | 6 +++--- .../main/java/com/freya02/bot/regexbot/commands/Info.java | 6 +++++- .../main/java/com/freya02/bot/regexbot/commands/Kick.java | 2 +- .../java/com/freya02/bot/wiki/slash/commands/SlashInfo.java | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/pom.xml b/examples/pom.xml index 5ecf4b675..5ed44150b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -32,7 +32,7 @@ net.dv8tion JDA - 5.0.0-alpha.18 + 5.0.0-alpha.19 club.minnced @@ -48,12 +48,12 @@ io.github.freya022 BotCommands - 2.5.0 + 2.6.0 org.postgresql postgresql - 42.4.1 + 42.5.0 com.zaxxer diff --git a/examples/src/main/java/com/freya02/bot/regexbot/commands/Info.java b/examples/src/main/java/com/freya02/bot/regexbot/commands/Info.java index 3b2a9dcb2..4b08c5a8c 100644 --- a/examples/src/main/java/com/freya02/bot/regexbot/commands/Info.java +++ b/examples/src/main/java/com/freya02/bot/regexbot/commands/Info.java @@ -8,7 +8,11 @@ import com.freya02.botcommands.api.prefixed.annotations.Description; import com.freya02.botcommands.api.prefixed.annotations.JDATextCommand; import com.freya02.botcommands.api.prefixed.annotations.TextOption; -import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.entities.Guild; +import net.dv8tion.jda.api.entities.Member; +import net.dv8tion.jda.api.entities.Role; +import net.dv8tion.jda.api.entities.User; +import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; @CommandMarker //No unused warnings @Category("Utils") diff --git a/examples/src/main/java/com/freya02/bot/regexbot/commands/Kick.java b/examples/src/main/java/com/freya02/bot/regexbot/commands/Kick.java index 5f0b1b28c..b3207b301 100644 --- a/examples/src/main/java/com/freya02/bot/regexbot/commands/Kick.java +++ b/examples/src/main/java/com/freya02/bot/regexbot/commands/Kick.java @@ -27,6 +27,6 @@ public class Kick extends TextCommand { public void exec(BaseCommandEvent event, @TextOption Member member, @TextOption(example = "Spam") /* In the help content this parameter will have 'Spam' as a reason example */ @Optional String reason) { - event.getGuild().kick(member, reason).queue(); + event.getGuild().kick(member).reason(reason).queue(); } } diff --git a/examples/src/main/java/com/freya02/bot/wiki/slash/commands/SlashInfo.java b/examples/src/main/java/com/freya02/bot/wiki/slash/commands/SlashInfo.java index 419efbab5..66fd7b9d3 100644 --- a/examples/src/main/java/com/freya02/bot/wiki/slash/commands/SlashInfo.java +++ b/examples/src/main/java/com/freya02/bot/wiki/slash/commands/SlashInfo.java @@ -5,8 +5,8 @@ import com.freya02.botcommands.api.application.slash.GuildSlashEvent; import com.freya02.botcommands.api.application.slash.annotations.JDASlashCommand; import net.dv8tion.jda.api.entities.Role; -import net.dv8tion.jda.api.entities.TextChannel; import net.dv8tion.jda.api.entities.User; +import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; public class SlashInfo extends ApplicationCommand { @JDASlashCommand(name = "info", subcommand = "user")