Added default behavior for tab completing (sending an empty list) cus it doesn't always need to do more
This commit is contained in:
parent
b39a155711
commit
6b60ba4a34
|
|
@ -4,13 +4,17 @@ import net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInterac
|
|||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.CommandData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class DiscordCommand {
|
||||
|
||||
public abstract String getName();
|
||||
|
||||
public abstract void execute(SlashCommandInteractionEvent event);
|
||||
|
||||
public abstract void suggest(CommandAutoCompleteInteractionEvent event);
|
||||
public void suggest(CommandAutoCompleteInteractionEvent event) {
|
||||
event.replyChoices(new ArrayList<>()).queue();
|
||||
}
|
||||
|
||||
public abstract CommandData getCommandData();
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import com.velocitypowered.api.proxy.Player;
|
|||
import net.dv8tion.jda.api.JDA;
|
||||
import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent;
|
||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||
import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions;
|
||||
import net.dv8tion.jda.api.interactions.commands.OptionMapping;
|
||||
|
|
@ -139,10 +138,6 @@ public class CommandLink extends DiscordCommand {
|
|||
.setEphemeral(true)
|
||||
.queue(res -> res.deleteOriginal().queueAfter(5, TimeUnit.SECONDS));
|
||||
}
|
||||
@Override
|
||||
public void suggest(CommandAutoCompleteInteractionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandData getCommandData() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user