Class GenericAutoCompleteInteractionEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
net.dv8tion.jda.api.events.interaction.GenericAutoCompleteInteractionEvent
- All Implemented Interfaces:
ISnowflake, GenericEvent, IAutoCompleteCallback, Interaction
- Direct Known Subclasses:
CommandAutoCompleteInteractionEvent
public class GenericAutoCompleteInteractionEvent
extends GenericInteractionCreateEvent
implements IAutoCompleteCallback
Indicates that a user is typing in an auto-complete interactive field.
Requirements
To receive these events, you must unset the Interactions Endpoint URL in your application dashboard.
You can simply remove the URL for this endpoint in your settings at the Discord Developers Portal.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGenericAutoCompleteInteractionEvent(JDA api, long responseNumber, Interaction interaction) -
Method Summary
Modifier and TypeMethodDescriptionTheInteractioninstance.replyChoices(Collection<Command.Choice> choices) Reply with up to 25 choices which can be picked from by the user.Methods inherited from class GenericInteractionCreateEvent
getChannel, getChannelIdLong, getContext, getEntitlements, getGuild, getGuildLocale, getIdLong, getIntegrationOwners, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledgedMethods inherited from class Event
getJDA, getRawData, getResponseNumber, toStringMethods inherited from interface IAutoCompleteCallback
replyChoice, replyChoice, replyChoice, replyChoiceDoubles, replyChoiceDoubles, replyChoiceLongs, replyChoiceLongs, replyChoices, replyChoiceStrings, replyChoiceStringsMethods inherited from interface Interaction
getChannel, getChannelId, getChannelIdLong, getChannelType, getContext, getEntitlements, getGuild, getGuildChannel, getGuildLocale, getIntegrationOwners, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromAttachedGuild, isFromGuildMethods inherited from interface ISnowflake
getId, getIdLong, getTimeCreated
-
Constructor Details
-
GenericAutoCompleteInteractionEvent
public GenericAutoCompleteInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull Interaction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericInteractionCreateEvent- Returns:
- The
Interaction
-
replyChoices
@Nonnull @CheckReturnValue public AutoCompleteCallbackAction replyChoices(@Nonnull Collection<Command.Choice> choices) Description copied from interface:IAutoCompleteCallbackReply with up to 25 choices which can be picked from by the user.
The user may continue writing inputs instead of using one of your choices.- Specified by:
replyChoicesin interfaceIAutoCompleteCallback- Parameters:
choices- The choice suggestions to present to the user, 0-25 choices- Returns:
AutoCompleteCallbackAction
-