Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.entities.Channel;
import net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent;
import net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent;
Expand Down Expand Up @@ -241,6 +242,17 @@ public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
.onSlashCommand(event));
}

@Override
public void onCommandAutoCompleteInteraction(final CommandAutoCompleteInteractionEvent event) {
String name = event.getName();

logger.debug("Received auto completion from command '{}' (#{}) on guild '{}'",
event.getCommandPath(), event.getId(), event.getGuild());
COMMAND_SERVICE.execute(() -> requireUserInteractor(
UserInteractorPrefix.SLASH_COMMAND.getPrefixedName(name), SlashCommand.class)
.onAutoComplete(event));
}

@Override
public void onButtonInteraction(ButtonInteractionEvent event) {
logger.debug("Received button click '{}' (#{}) on guild '{}'", event.getComponentId(),
Expand Down