Interface CommandAutoCompleteInteraction
- All Superinterfaces:
CommandInteractionPayload,IAutoCompleteCallback,Interaction,ISnowflake
- All Known Implementing Classes:
CommandAutoCompleteInteractionEvent
public interface CommandAutoCompleteInteraction
extends IAutoCompleteCallback, CommandInteractionPayload
Interaction for auto-complete options in slash-commands.
These interactions may provide incomplete lists of options with invalid values as they represent partial command executions. Some required options may be missing. All the provided options can be used as "context" for the focused option, but they might not be valid.
These interactions may provide incomplete lists of options with invalid values as they represent partial command executions. Some required options may be missing. All the provided options can be used as "context" for the focused option, but they might not be valid.
This is used to suggest up to 25 choices for the focused option.
-
Method Summary
Modifier and TypeMethodDescriptionThe channel this interaction happened in.The focused option which the user is typing.default GuildMessageChannelUnionTheGuildChannelthis interaction happened in.Methods inherited from interface net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload
getCommandId, getCommandIdLong, getCommandPath, getCommandString, getCommandType, getName, getOption, getOption, getOption, getOption, getOptions, getOptionsByName, getOptionsByType, getSubcommandGroup, getSubcommandName, isGlobalCommand, isGuildCommandMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IAutoCompleteCallback
replyChoice, replyChoice, replyChoice, replyChoiceDoubles, replyChoiceDoubles, replyChoiceLongs, replyChoiceLongs, replyChoices, replyChoices, replyChoiceStrings, replyChoiceStringsMethods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelType, getGuild, getGuildLocale, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromGuildMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getFocusedOption
The focused option which the user is typing.This is not validated by the Discord API and may contain invalid/incomplete inputs.
- Returns:
- The focused
AutoCompleteQuery
-
getChannel
Description copied from interface:InteractionThe channel this interaction happened in.
This is currently never null, but might be nullable in the future.- Specified by:
getChannelin interfaceInteraction- Returns:
- The channel or null if this interaction is not from a channel context
-
getGuildChannel
Description copied from interface:InteractionTheGuildChannelthis interaction happened in.
IfInteraction.getChannelType()is not a guild type, this throwsIllegalStateException!- Specified by:
getGuildChannelin interfaceInteraction- Returns:
- The
GuildChannel
-