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.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericAutoCompleteInteractionEvent
(JDA api, long responseNumber, Interaction interaction) -
Method Summary
Modifier and TypeMethodDescriptionTheInteraction
instance.replyChoices
(Collection<Command.Choice> choices) Reply with up to 25 choices which can be picked from by the user.Methods inherited from class net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
getChannel, getChannelIdLong, getEntitlements, getGuild, getGuildLocale, getIdLong, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledged
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumber, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IAutoCompleteCallback
replyChoice, replyChoice, replyChoice, replyChoiceDoubles, replyChoiceDoubles, replyChoiceLongs, replyChoiceLongs, replyChoices, replyChoiceStrings, replyChoiceStrings
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannel, getChannelId, getChannelIdLong, getChannelType, getEntitlements, getGuild, getGuildChannel, getGuildLocale, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromGuild
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Constructor Details
-
GenericAutoCompleteInteractionEvent
public GenericAutoCompleteInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull Interaction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEvent
TheInteraction
instance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteraction
in classGenericInteractionCreateEvent
- Returns:
- The
Interaction
-
replyChoices
@Nonnull public AutoCompleteCallbackAction replyChoices(@Nonnull Collection<Command.Choice> choices) Description copied from interface:IAutoCompleteCallback
Reply 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:
replyChoices
in interfaceIAutoCompleteCallback
- Parameters:
choices
- The choice suggestions to present to the user, 0-25 choices- Returns:
AutoCompleteCallbackAction
-