Finish command completion listener implementation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Very similarly to how the slash command interface works, now a slash command auto-completion interface also exists, with its respective listener.
This commit is contained in:
@@ -4,15 +4,21 @@ import net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInterac
|
||||
import net.dv8tion.jda.api.interactions.commands.Command;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import wtf.beatrice.hidekobot.Cache;
|
||||
import wtf.beatrice.hidekobot.objects.commands.SlashArgumentsCompleterImpl;
|
||||
import wtf.beatrice.hidekobot.objects.commands.SlashCommand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AvatarCompleter
|
||||
public class AvatarCommandCompleter extends SlashArgumentsCompleterImpl
|
||||
{
|
||||
|
||||
public AvatarCompleter(@NotNull CommandAutoCompleteInteractionEvent event)
|
||||
{
|
||||
public AvatarCommandCompleter(SlashCommand parentCommand) {
|
||||
super(parentCommand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runCompletion(@NotNull CommandAutoCompleteInteractionEvent event) {
|
||||
if(event.getFocusedOption().getName().equals("size"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user