class BaseInteraction

extends

Base
export class BaseInteraction<Cached extends CacheType = CacheType> extends Base

Represents an interaction.

Constructors

constructor(
client: Client<true>
)

Constructs a new instance of the BaseInteraction class

Type Parameters

optional
Cached? extends CacheType = CacheType

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

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

readonly
createdAt : Date

The time the interaction was created at

readonly
createdTimestamp : number

The timestamp the interaction was created at

entitlements : Collection<Snowflake, Entitlement>

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

id : Snowflake

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 AnySelectMenuInteraction<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

deprecated
isSelectMenu() : this is StringSelectMenuInteraction<Cached>

Indicates whether this interaction is a StringSelectMenuInteraction.

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: Record<string, boolean | string>[]
) : unknown

Inherited from: Base

valueOf() : string

Inherited from: Base