Skip to content

Commit f102965

Browse files
committed
Update JDA and Chewtils so we can update MMDBot
Signed-off-by: KiriCattus <19393068+KiriCattus@users.noreply.github.com>
1 parent 75e788e commit f102965

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
33
licenser = { id = "org.cadixdev.licenser", version = "0.6.1" }
44

55
[versions]
6-
jda = "5.0.0-beta.24"
7-
chewtils = "2.0-SNAPSHOT"
6+
jda = "6.3.2"
7+
chewtils = "39a83bd8"
88
gson = "2.11.0"
99
logback = "1.5.6"
1010
annotations = "24.1.0"
@@ -13,7 +13,7 @@ jsr305 = "3.0.2"
1313

1414
[libraries]
1515
jda = { module = "net.dv8tion:JDA", version.ref = "jda" }
16-
chewtils = { module = "pw.chew:jda-chewtils", version.ref = "chewtils" }
16+
chewtils = { module = "com.github.Chew:JDA-Chewtils", version.ref = "chewtils" }
1717
chewtils-command = { module = "pw.chew:jda-chewtils-command", version.ref = "chewtils" }
1818
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
1919
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }

src/launcher/java/com/mcmoddev/relauncher/discord/commands/StatusCommand.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
import com.mcmoddev.relauncher.api.BaseProcessManager;
2727
import com.mcmoddev.relauncher.api.connector.ThreadInfo;
2828
import net.dv8tion.jda.api.EmbedBuilder;
29+
import net.dv8tion.jda.api.components.actionrow.ActionRow;
30+
import net.dv8tion.jda.api.components.buttons.Button;
2931
import net.dv8tion.jda.api.events.GenericEvent;
3032
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
3133
import net.dv8tion.jda.api.hooks.EventListener;
32-
import net.dv8tion.jda.api.interactions.components.buttons.Button;
3334
import net.dv8tion.jda.api.utils.FileUpload;
3435
import net.dv8tion.jda.api.utils.TimeFormat;
3536
import org.jetbrains.annotations.NotNull;
@@ -94,15 +95,15 @@ protected void exec(final SlashCommandEvent event) {
9495

9596
event.deferReply()
9697
.addEmbeds(embed.build())
97-
.addActionRow(Button.primary(BUTTON_NAME, "\uD83D\uDCF7 Thread Dump"))
98+
.addComponents(ActionRow.of(Button.primary(BUTTON_NAME, "\uD83D\uDCF7 Thread Dump")))
9899
.queue();
99100
}
100101
}
101102

102103
@Override
103104
public void onEvent(@NotNull final GenericEvent e$) {
104105
if (!(e$ instanceof ButtonInteractionEvent event)) return;
105-
if (event.getButton().getId() == null || !event.getButton().getId().equals(BUTTON_NAME) || !event.isFromGuild()) {
106+
if (event.getButton().getCustomId() == null || !event.getButton().getCustomId().equals(BUTTON_NAME) || !event.isFromGuild()) {
106107
event.deferEdit().queue();
107108
return;
108109
}

0 commit comments

Comments
 (0)