Skip to content

Interaction ​

classe · Source

Represents an interaction.

Extends: Base

Properties ​

type ​

type: InteractionType

The interaction's type Source

id ​

id: Snowflake

The interaction's id Source

token ​

readonly

token: string

The interaction's token Source

applicationId ​

applicationId: Snowflake

The application's id Source

channelId ​

nullable

channelId: Snowflake

The id of the channel this interaction was sent in Source

guildId ​

nullable

guildId: Snowflake

The id of the guild this interaction was sent in Source

user ​

user: User

The user which sent this interaction Source

member ​

nullable

member: GuildMember | APIGuildMember

If this interaction was sent in a guild, the member which sent it Source

version ​

version: number

The version Source

appPermissions ​

nullable

appPermissions: Readonly<Permissions>

Set of permissions the application or bot has within the channel the interaction was sent from Source

memberPermissions ​

nullable

memberPermissions: Readonly<Permissions>

The permissions of the member, if one exists, in the channel this interaction was executed in Source

locale ​

locale: Locale

The locale of the user who invoked this interaction Source

guildLocale ​

nullable

guildLocale: Locale

The preferred locale from the guild this interaction was sent in Source

authorizingIntegrationOwners ​

authorizingIntegrationOwners: AuthorizingIntegrationOwners

Owners for each installation context that authorized this interaction. Source

createdTimestamp ​

readonly

createdTimestamp: number

The timestamp the interaction was created at Source

createdAt ​

readonly

createdAt: Date

The time the interaction was created at Source

channel ​

readonly · nullable

channel: TextBasedChannels

The channel this interaction was sent in Source

guild ​

readonly · nullable

guild: Guild

The guild this interaction was sent in Source

client ​

readonly

client: Client

The client that instantiated this Source

Methods ​

inGuild ​

inGuild(): boolean

Indicates whether this interaction is received from a guild. Returns: booleanSource

inCachedGuild ​

inCachedGuild(): boolean

Indicates whether or not this interaction is both cached and received from a guild. Returns: booleanSource

inRawGuild ​

inRawGuild(): boolean

Indicates whether or not this interaction is received from an uncached guild. Returns: booleanSource

isApplicationCommand ​

isApplicationCommand(): boolean

Indicates whether this interaction is a BaseCommandInteraction. Returns: booleanSource

isCommand ​

isCommand(): boolean

Indicates whether this interaction is a CommandInteraction. Returns: booleanSource

isContextMenu ​

isContextMenu(): boolean

Indicates whether this interaction is a ContextMenuInteractionReturns: booleanSource

isModalSubmit ​

isModalSubmit(): boolean

Indicates whether this interaction is a ModalSubmitInteractionReturns: booleanSource

isUserContextMenu ​

isUserContextMenu(): boolean

Indicates whether this interaction is a UserContextMenuInteractionReturns: booleanSource

isMessageContextMenu ​

isMessageContextMenu(): boolean

Indicates whether this interaction is a MessageContextMenuInteractionReturns: booleanSource

isAutocomplete ​

isAutocomplete(): boolean

Indicates whether this interaction is an AutocompleteInteractionReturns: booleanSource

isMessageComponent ​

isMessageComponent(): boolean

Indicates whether this interaction is a MessageComponentInteraction. Returns: booleanSource

isButton ​

isButton(): boolean

Indicates whether this interaction is a ButtonInteraction. Returns: booleanSource

isSelectMenu ​

isSelectMenu(): boolean

Indicates whether this interaction is a SelectMenuInteraction. Returns: booleanSource

isRepliable ​

isRepliable(): boolean

Indicates whether this interaction can be replied to. Returns: booleanSource

Unofficial software. Not affiliated with or supported by Discord.