BaseInteraction

export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
Represents an interaction.

Extends

Base
NameConstraintsOptionalDefaultDescription
CachedCacheTypeYesCacheTypeNone
constructor(client, data)
Constructs a new instance of the BaseInteraction class
NameTypeOptionalDescription
clientClient<true>NoNone
dataRawInteractionDataNoNone
applicationId:Snowflake
The application's id
Set of permissions the application or bot has within the channel the interaction was sent from
authorizingIntegrationOwners:APIAuthorizingIntegrationOwnersMap
Mapping of installation contexts that the interaction was authorized for the related user or guild ids
The channel this interaction was sent in
channelId:Snowflake | null
The id of the channel this interaction was sent in
Readonly
client:Client<true>
The client that instantiated this
Inherited from Base
Context where the interaction was triggered from
Readonly
createdAt:Date
The time the interaction was created at
Readonly
createdTimestamp:number
The timestamp the interaction was created at
The entitlements for the invoking user, representing access to premium SKUs
Readonly
guild:CacheTypeReducer<Cached, Guild, null>
The guild this interaction was sent in
guildId:CacheTypeReducer<Cached, Snowflake>
The id of the guild this interaction was sent in
guildLocale:CacheTypeReducer<Cached, 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:CacheTypeReducer<Cached, Readonly<PermissionsBitField>>
The permissions of the member, if one exists, in the channel this interaction was executed in
Readonly
token:string
The interaction's token
The interaction's type
user:User
The user who created this interaction
version:number
The version
inCachedGuild():this is BaseInteraction<'cached'>
Indicates whether this interaction is received from a cached guild.
inGuild():this is BaseInteraction<'raw' | 'cached'>
Indicates whether this interaction is received from a guild.
inRawGuild():this is BaseInteraction<'raw'>
Indicates whether or not this interaction is received from an uncached guild.
isAnySelectMenu():this is SelectMenuInteraction<Cached>
Indicates whether this interaction is a select menu of any known type.
isAutocomplete():this is AutocompleteInteraction<Cached>
Indicates whether this interaction is an AutocompleteInteraction
isButton():this is ButtonInteraction<Cached>
Indicates whether this interaction is a ButtonInteraction.
isChannelSelectMenu():this is ChannelSelectMenuInteraction<Cached>
Indicates whether this interaction is a ChannelSelectMenuInteraction
isChatInputCommand():this is ChatInputCommandInteraction<Cached>
Indicates whether this interaction is a ChatInputCommandInteraction.
isCommand():this is CommandInteraction<Cached>
Indicates whether this interaction is a CommandInteraction
isContextMenuCommand():this is ContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a ContextMenuCommandInteraction
isMentionableSelectMenu():this is MentionableSelectMenuInteraction<Cached>
Indicates whether this interaction is a MentionableSelectMenuInteraction
isMessageComponent():this is MessageComponentInteraction<Cached>
Indicates whether this interaction is a MessageComponentInteraction
isMessageContextMenuCommand():this is MessageContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a MessageContextMenuCommandInteraction
isModalSubmit():this is ModalSubmitInteraction<Cached>
Indicates whether this interaction is a ModalSubmitInteraction
isRepliable():this is RepliableInteraction<Cached>
Indicates whether this interaction can be replied to.
isRoleSelectMenu():this is RoleSelectMenuInteraction<Cached>
Indicates whether this interaction is a RoleSelectMenuInteraction
isStringSelectMenu():this is StringSelectMenuInteraction<Cached>
Indicates whether this interaction is a StringSelectMenuInteraction.
isUserContextMenuCommand():this is UserContextMenuCommandInteraction<Cached>
Indicates whether this interaction is a UserContextMenuCommandInteraction
isUserSelectMenu():this is UserSelectMenuInteraction<Cached>
Indicates whether this interaction is a UserSelectMenuInteraction
toJSON(...props):unknown
NameTypeOptionalDescription
...propsRecord<string, boolean | string>[]NoNone
Inherited from Base
valueOf():string