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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe respectiveMessageChannelUnion
for this interaction.The focused option which the user is typing.default GuildMessageChannelUnion
TheGuildChannel
this interaction happened in.Methods inherited from interface net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload
getCommandId, getCommandIdLong, getCommandString, getCommandType, getFullCommandName, getName, getOption, getOption, getOption, getOption, getOptions, getOptionsByName, getOptionsByType, getSubcommandGroup, getSubcommandName, isGlobalCommand, isGuildCommand
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IAutoCompleteCallback
replyChoice, replyChoice, replyChoice, replyChoiceDoubles, replyChoiceDoubles, replyChoiceLongs, replyChoiceLongs, replyChoices, replyChoices, replyChoiceStrings, replyChoiceStrings
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelId, getChannelIdLong, getChannelType, getEntitlements, getGuild, getGuildLocale, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromGuild
Methods 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
The respectiveMessageChannelUnion
for this interaction.- Specified by:
getChannel
in interfaceInteraction
- Returns:
- The
MessageChannelUnion
-
getGuildChannel
Description copied from interface:Interaction
TheGuildChannel
this interaction happened in.
IfInteraction.getChannelType()
is not a guild type, this throwsIllegalStateException
!- Specified by:
getGuildChannel
in interfaceInteraction
- Returns:
- The
GuildChannel
-