Skip to content

Commit 252531d

Browse files
Bumped JDA version & made SlashCommand return InteractionCallbackAction<?>
1 parent cd496a8 commit 252531d

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies {
2020
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
2121
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
2222

23-
implementation 'com.github.Xirado:JDA:7e0ffc5c83'
23+
implementation 'com.github.DV8FromTheWorld:JDA:5492a76bce'
2424
implementation 'com.google.code.gson:gson:2.9.0'
2525
implementation 'org.yaml:snakeyaml:1.29'
2626
implementation 'com.google.re2j:re2j:1.6'

src/main/java/net/javadiscord/javabot/command/DelegatingCommandHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.javadiscord.javabot.command;
22

33
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
4-
import net.dv8tion.jda.api.interactions.InteractionHook;
54
import net.dv8tion.jda.api.requests.restaction.interactions.InteractionCallbackAction;
65
import net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction;
76
import net.javadiscord.javabot.command.interfaces.SlashCommand;
@@ -93,7 +92,7 @@ protected void addSubcommandGroup(String name, SlashCommand handler) {
9392
* @return The reply action that is sent to the user.
9493
*/
9594
@Override
96-
public InteractionCallbackAction<InteractionHook> handleSlashCommandInteraction(SlashCommandInteractionEvent event) throws ResponseException {
95+
public InteractionCallbackAction<?> handleSlashCommandInteraction(SlashCommandInteractionEvent event) throws ResponseException {
9796
// First we check if the event has specified a subcommand group, and if we have a group handler for it.
9897
if (event.getSubcommandGroup() != null) {
9998
SlashCommand groupHandler = this.getSubcommandGroupHandlers().get(event.getSubcommandGroup());

src/main/java/net/javadiscord/javabot/command/interfaces/SlashCommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.javadiscord.javabot.command.interfaces;
22

33
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
4-
import net.dv8tion.jda.api.interactions.InteractionHook;
54
import net.dv8tion.jda.api.requests.restaction.interactions.InteractionCallbackAction;
65
import net.javadiscord.javabot.command.ResponseException;
76

@@ -21,5 +20,5 @@
2120
* </p>
2221
*/
2322
public interface SlashCommand {
24-
InteractionCallbackAction<InteractionHook> handleSlashCommandInteraction(SlashCommandInteractionEvent event) throws ResponseException;
23+
InteractionCallbackAction<?> handleSlashCommandInteraction(SlashCommandInteractionEvent event) throws ResponseException;
2524
}

src/main/java/net/javadiscord/javabot/systems/staff/self_roles/SelfRoleCommandHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.javadiscord.javabot.systems.staff.self_roles;
22

33
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
4-
import net.dv8tion.jda.api.interactions.InteractionHook;
54
import net.dv8tion.jda.api.requests.restaction.interactions.InteractionCallbackAction;
65
import net.javadiscord.javabot.command.DelegatingCommandHandler;
76
import net.javadiscord.javabot.command.ResponseException;
@@ -24,7 +23,7 @@ public SelfRoleCommandHandler() {
2423
}
2524

2625
@Override
27-
public InteractionCallbackAction<InteractionHook> handleSlashCommandInteraction(SlashCommandInteractionEvent event) {
26+
public InteractionCallbackAction<?> handleSlashCommandInteraction(SlashCommandInteractionEvent event) {
2827
try {
2928
return super.handleSlashCommandInteraction(event);
3029
} catch(ResponseException e) {

0 commit comments

Comments
 (0)