class AutocompleteInteraction
extends
BaseInteraction<Cached>export class AutocompleteInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached>
Represents an autocomplete interaction.
Snowflake applicationId :
The application's id
optionalReadonly<PermissionsBitField> appPermissions? :
Set of permissions the application or bot has within the channel the interaction was sent from
readonlyoptionalTextBasedChannels channel? :
The channel this interaction was sent in
Snowflake channelId :
The id of the channel this interaction was sent in
readonlyClient client :
The client that instantiated this
readonlyApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null command :
The invoked application command, if it was fetched before
The id of the guild the invoked application command is registered to
Snowflake commandId :
The invoked application command's id
string commandName :
The invoked application command's name
ApplicationCommandType.ChatInput commandType :
The invoked application command's type
readonlyDate createdAt :
The time the interaction was created at
readonlynumber createdTimestamp :
The timestamp the interaction was created at
readonlyoptionalGuild guild? :
The guild this interaction was sent in
optionalSnowflake guildId? :
The id of the guild this interaction was sent in
optionalLocale guildLocale? :
The preferred locale from the guild this interaction was sent in
Snowflake id :
The interaction's id
Locale locale :
The locale of the user who invoked this interaction
optionalGuildMember | APIGuildMember member? :
If this interaction was sent in a guild, the member which sent it
optionalReadonly<PermissionsBitField> memberPermissions? :
The permissions of the member, if one exists, in the channel this interaction was executed in
Omit< CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getUser' | 'getAttachment' | 'getChannel' | 'getMember' | 'getMentionable' | 'getRole' > options :
The options passed to the command
boolean responded :
Whether this interaction has already received a response
readonlystring token :
The interaction's token
The interaction's type
User user :
The user who created this interaction
number version :
The version
inCachedGuildthis is AutocompleteInteraction<'cached'> () :
Indicates whether or not this interaction is both cached and received from a guild.
inGuildthis is AutocompleteInteraction<'raw' | 'cached'> () :
Indicates whether this interaction is received from a guild.
inRawGuildthis is AutocompleteInteraction<'raw'> () :
Indicates whether or not this interaction is received from an uncached guild.
isAnySelectMenuthis is AnySelectMenuInteraction<Cached> () :
Indicates whether this interaction is a select menu of any known type.
Inherited from: BaseInteraction
isAutocompletethis is AutocompleteInteraction<Cached> () :
Indicates whether this interaction is an AutocompleteInteraction
Inherited from: BaseInteraction
isButtonthis is ButtonInteraction<Cached> () :
Indicates whether this interaction is a ButtonInteraction.
Inherited from: BaseInteraction
isChannelSelectMenuthis is ChannelSelectMenuInteraction<Cached> () :
Indicates whether this interaction is a ChannelSelectMenuInteraction
Inherited from: BaseInteraction
isChatInputCommandthis is ChatInputCommandInteraction<Cached> () :
Indicates whether this interaction is a ChatInputCommandInteraction.
Inherited from: BaseInteraction
isCommandthis is CommandInteraction<Cached> () :
Indicates whether this interaction is a CommandInteraction
Inherited from: BaseInteraction
isContextMenuCommandthis is ContextMenuCommandInteraction<Cached> () :
Indicates whether this interaction is a ContextMenuCommandInteraction
Inherited from: BaseInteraction
isMentionableSelectMenuthis is MentionableSelectMenuInteraction<Cached> () :
Indicates whether this interaction is a MentionableSelectMenuInteraction
Inherited from: BaseInteraction
isMessageComponentthis is MessageComponentInteraction<Cached> () :
Indicates whether this interaction is a MessageComponentInteraction
Inherited from: BaseInteraction
isMessageContextMenuCommandthis is MessageContextMenuCommandInteraction<Cached> () :
Indicates whether this interaction is a MessageContextMenuCommandInteraction
Inherited from: BaseInteraction
isModalSubmitthis is ModalSubmitInteraction<Cached> () :
Indicates whether this interaction is a ModalSubmitInteraction
Inherited from: BaseInteraction
isRepliablethis is RepliableInteraction<Cached> () :
Indicates whether this interaction can be replied to.
Inherited from: BaseInteraction
isRoleSelectMenuthis is RoleSelectMenuInteraction<Cached> () :
Indicates whether this interaction is a RoleSelectMenuInteraction
Inherited from: BaseInteraction
deprecated isSelectMenuthis is StringSelectMenuInteraction<Cached> () :
Use isStringSelectMenu instead.
Indicates whether this interaction is a StringSelectMenuInteraction.
Inherited from: BaseInteraction
isStringSelectMenuthis is StringSelectMenuInteraction<Cached> () :
Indicates whether this interaction is a StringSelectMenuInteraction.
Inherited from: BaseInteraction
isUserContextMenuCommandthis is UserContextMenuCommandInteraction<Cached> () :
Indicates whether this interaction is a UserContextMenuCommandInteraction
Inherited from: BaseInteraction
isUserSelectMenuthis is UserSelectMenuInteraction<Cached> () :
Indicates whether this interaction is a UserSelectMenuInteraction
Inherited from: BaseInteraction
respondoptions: ApplicationCommandOptionChoiceData[]) : Promise<void> (
Sends results for the autocomplete of this interaction.
// respond to autocomplete interaction
interaction.respond([
{
name: 'Option 1',
value: 'option1',
},
])
.then(() => console.log('Successfully responded to the autocomplete interaction'))
.catch(console.error);