Add getInteractionHook to InteractionContext abstraction

This commit is contained in:
anthorob committed 2026-08-24 17:03:13 -04:00
1 parent 81e15a5394
commit c98d47b5ca
1 file changed
-9
@@ -8,7 +8,6 @@ package me.bobert.netneutrality.context;
import me.bobert.netneutrality.core.context.CommandContext; import me.bobert.netneutrality.core.context.CommandContext;
import me.bobert.netneutrality.core.context.InteractionContext; import me.bobert.netneutrality.core.context.InteractionContext;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.InteractionHook;
import net.dv8tion.jda.api.interactions.modals.Modal; import net.dv8tion.jda.api.interactions.modals.Modal;
public class SlashCommandContext extends CommandContext implements InteractionContext { public class SlashCommandContext extends CommandContext implements InteractionContext {
@@ -24,14 +23,6 @@ public class SlashCommandContext extends CommandContext implements InteractionCo
return event; return event;
} }
@Override
public InteractionHook getInteractionHook() {
if (!event.isAcknowledged())
throw new RuntimeException("Interaction isn't acknowledged yet");
return event.getHook();
}
@Override @Override
public void deleteMessage() { public void deleteMessage() {
// not implemented // not implemented