MentionableSelectMenuInteraction

export class MentionableSelectMenuInteraction< Cached extends CacheType = CacheType,> extends MessageComponentInteraction<Cached>
export class MentionableSelectMenuInteraction< Cached extends CacheType = CacheType,> extends MessageComponentInteraction<Cached>
Represents a ComponentType.MentionableSelect select menu interaction.
NameConstraintsOptionalDefaultDescription
CachedCacheTypeYesCacheTypeNone
constructor(client, data)
Constructs a new instance of the MentionableSelectMenuInteraction class
NameTypeOptionalDescription
clientClient<true>NoNone
dataAPIMessageMentionableSelectInteractionDataNoNone
applicationId:Snowflake
The application's id
appPermissions?:Readonly<PermissionsBitField>
Set of permissions the application or bot has within the channel the interaction was sent from
Readonly
The channel this interaction was sent in
channelId:Snowflake
The id of the channel this interaction was sent in
Readonly
client:Client
The client that instantiated this
The type of component which was interacted with
Readonly
createdAt:Date
The time the interaction was created at
Readonly
createdTimestamp:number
The timestamp the interaction was created at
customId:string
The custom id of the component which was interacted with
deferred:boolean
Whether the reply to this interaction has been deferred
ephemeral?:boolean
Whether the reply to this interaction is ephemeral
Readonly
guild?:Guild
The guild this interaction was sent in
guildId?:Snowflake
The id of the guild this interaction was sent in
guildLocale?:Locale
The preferred locale from the guild this interaction was sent in
The interaction's id
locale:Locale
The locale of the user who invoked this interaction
If this interaction was sent in a guild, the member which sent it
memberPermissions?:Readonly<PermissionsBitField>
The permissions of the member, if one exists, in the channel this interaction was executed in
message:Message
The message to which the component was attached
replied:boolean
Whether this interaction has already been replied to
Collection of the selected roles
Readonly
token:string
The interaction's token
The interaction's type
user:User
The user who created this interaction
Collection of the selected users
values:Snowflake[]
An array of the selected user and role ids
version:number
The version
An associated interaction webhook, can be used to further interact with this interaction
awaitModalSubmit(options):Promise<ModalSubmitInteraction<Cached>>
Collects a single modal submit interaction that passes the filter. The Promise will reject if the time expires.
Example
// Collect a modal submit interaction
const filter = (interaction) => interaction.customId === 'modal';
interaction.awaitModalSubmit({ filter, time: 15_000 })
.then(interaction => console.log(`${interaction.customId} was submitted!`))
.catch(console.error);
// Collect a modal submit interaction
const filter = (interaction) => interaction.customId === 'modal';
interaction.awaitModalSubmit({ filter, time: 15_000 })
.then(interaction => console.log(`${interaction.customId} was submitted!`))
.catch(console.error);
NameTypeOptionalDescription
optionsAwaitModalSubmitOptions<ModalSubmitInteraction>NoOptions to pass to the internal collector
Inherited from MessageComponentInteraction
deferReply(options):Promise<Message<BooleanCache<Cached>>>
Defers the reply to this interaction.
Example
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
Example
// Defer to send an ephemeral reply later
interaction.deferReply({ ephemeral: true })
.then(console.log)
.catch(console.error);
// Defer to send an ephemeral reply later
interaction.deferReply({ ephemeral: true })
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
optionsInteractionDeferReplyOptions & { fetchReply: true }NoOptions for deferring the reply to this interaction
deferUpdate(options):Promise<Message<BooleanCache<Cached>>>
Defers an update to the message to which the component was attached.
Example
// Defer updating and reset the component's loading state
interaction.deferUpdate()
.then(console.log)
.catch(console.error);
// Defer updating and reset the component's loading state
interaction.deferUpdate()
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
optionsInteractionDeferUpdateOptions & { fetchReply: true }NoOptions for deferring the update to this interaction
deleteReply(message?):Promise<void>
Deletes a reply to this interaction.
Example
// Delete the initial reply to this interaction
interaction.deleteReply()
.then(console.log)
.catch(console.error);
// Delete the initial reply to this interaction
interaction.deleteReply()
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
messageMessageResolvable | '@original'YesThe response to delete
Inherited from MessageComponentInteraction
editReply(options):Promise<Message<BooleanCache<Cached>>>
Edits a reply to this interaction.
Example
// Edit the initial reply to this interaction
interaction.editReply('New content')
.then(console.log)
.catch(console.error);
// Edit the initial reply to this interaction
interaction.editReply('New content')
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
optionsstring | MessagePayload | InteractionEditReplyOptionsNoThe new options for the message
Inherited from MessageComponentInteraction
fetchReply(message?):Promise<Message<BooleanCache<Cached>>>
Fetches a reply to this interaction.
Example
// Fetch the initial reply to this interaction
interaction.fetchReply()
.then(reply => console.log(`Replied with ${reply.content}`))
.catch(console.error);
// Fetch the initial reply to this interaction
interaction.fetchReply()
.then(reply => console.log(`Replied with ${reply.content}`))
.catch(console.error);
NameTypeOptionalDescription
messageSnowflake | '@original'YesThe response to fetch
Inherited from MessageComponentInteraction
followUp(options):Promise<Message<BooleanCache<Cached>>>
Send a follow-up message to this interaction.
NameTypeOptionalDescription
optionsstring | MessagePayload | InteractionReplyOptionsNoThe options for the reply
Inherited from MessageComponentInteraction
inCachedGuild():this is MentionableSelectMenuInteraction<'cached'>
Indicates whether or not this interaction is both cached and received from a guild.
inGuild():this is MentionableSelectMenuInteraction<'raw' | 'cached'>
Indicates whether this interaction is received from a guild.
inRawGuild():this is MentionableSelectMenuInteraction<'raw'>
Indicates whether or not this interaction is received from an uncached guild.
isAnySelectMenu():this is AnySelectMenuInteraction<Cached>
Indicates whether this interaction is a select menu of any known type.
Inherited from BaseInteraction
isAutocomplete():this is AutocompleteInteraction<Cached>
Indicates whether this interaction is an AutocompleteInteraction
Inherited from BaseInteraction
isButton():this is ButtonInteraction<Cached>
Indicates whether this interaction is a ButtonInteraction.
Inherited from BaseInteraction
isChannelSelectMenu():this is ChannelSelectMenuInteraction<Cached>
Indicates whether this interaction is a ChannelSelectMenuInteraction
Inherited from BaseInteraction
isChatInputCommand():this is ChatInputCommandInteraction<Cached>
Indicates whether this interaction is a ChatInputCommandInteraction.
Inherited from BaseInteraction
isCommand():this is CommandInteraction<Cached>
Indicates whether this interaction is a CommandInteraction
Inherited from BaseInteraction
isContextMenuCommand():this is ContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a ContextMenuCommandInteraction
Inherited from BaseInteraction
isMentionableSelectMenu():this is MentionableSelectMenuInteraction<Cached>
Indicates whether this interaction is a MentionableSelectMenuInteraction
Inherited from BaseInteraction
isMessageComponent():this is MessageComponentInteraction<Cached>
Indicates whether this interaction is a MessageComponentInteraction
Inherited from BaseInteraction
isMessageContextMenuCommand():this is MessageContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a MessageContextMenuCommandInteraction
Inherited from BaseInteraction
isModalSubmit():this is ModalSubmitInteraction<Cached>
Indicates whether this interaction is a ModalSubmitInteraction
Inherited from BaseInteraction
isRepliable():this is RepliableInteraction<Cached>
Indicates whether this interaction can be replied to.
Inherited from BaseInteraction
isRoleSelectMenu():this is RoleSelectMenuInteraction<Cached>
Indicates whether this interaction is a RoleSelectMenuInteraction
Inherited from BaseInteraction
Deprecated
isSelectMenu():this is StringSelectMenuInteraction<Cached>
Use isStringSelectMenu instead.
Deprecated
Indicates whether this interaction is a StringSelectMenuInteraction.
Inherited from BaseInteraction
isStringSelectMenu():this is StringSelectMenuInteraction<Cached>
Indicates whether this interaction is a StringSelectMenuInteraction.
Inherited from BaseInteraction
isUserContextMenuCommand():this is UserContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a UserContextMenuCommandInteraction
Inherited from BaseInteraction
isUserSelectMenu():this is UserSelectMenuInteraction<Cached>
Indicates whether this interaction is a UserSelectMenuInteraction
Inherited from BaseInteraction
reply(options):Promise<Message<BooleanCache<Cached>>>
Creates a reply to this interaction. Use the fetchReply option to get the bot's reply message.
Example
// Reply to the interaction and fetch the response
interaction.reply({ content: 'Pong!', fetchReply: true })
.then((message) => console.log(`Reply sent with content ${message.content}`))
.catch(console.error);
// Reply to the interaction and fetch the response
interaction.reply({ content: 'Pong!', fetchReply: true })
.then((message) => console.log(`Reply sent with content ${message.content}`))
.catch(console.error);
Example
// Create an ephemeral reply with an embed
const embed = new EmbedBuilder().setDescription('Pong!');

interaction.reply({ embeds: [embed], ephemeral: true })
.then(() => console.log('Reply sent.'))
.catch(console.error);
// Create an ephemeral reply with an embed
const embed = new EmbedBuilder().setDescription('Pong!');

interaction.reply({ embeds: [embed], ephemeral: true })
.then(() => console.log('Reply sent.'))
.catch(console.error);
NameTypeOptionalDescription
optionsInteractionReplyOptions & { fetchReply: true }NoThe options for the reply
showModal(modal):Promise<void>
Shows a modal component
Inherited from MessageComponentInteraction
toJSON(...props):unknown
NameTypeOptionalDescription
...propsRecord<string, boolean | string>[]NoNone
Inherited from Base
update(options):Promise<Message<BooleanCache<Cached>>>
Updates the original message of the component on which the interaction was received on.
Example
// Remove the components from the message
interaction.update({
content: "A component interaction was received",
components: []
})
.then(console.log)
.catch(console.error);
// Remove the components from the message
interaction.update({
content: "A component interaction was received",
components: []
})
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
optionsInteractionUpdateOptions & { fetchReply: true }NoThe options for the updated message
valueOf():string