Class ComponentInteraction<V, T>

Represents a component interaction.

Type Parameters

Hierarchy (view full)

Constructors

Properties

acknowledged: boolean

If this interaction has been acknowledged.

appPermissions: T extends AnyTextableGuildChannel
    ? Permission
    : undefined | Permission

The permissions the bot has in the channel this interaction was sent from, if this interaction is sent from a guild.

application?: ClientApplication

The application this interaction is for.

applicationID: string

The ID of the application this interaction is for.

channelID: string

The ID of the channel this interaction was sent from.

The data associated with the interaction.

entitlements: (Entitlement | TestEntitlement)[]

The entitlements for the user that created this interaction, and the guild it was created in.

guildID: T extends AnyTextableGuildChannel
    ? string
    : null | string

The id of the guild this interaction was sent from, if applicable.

guildLocale: T extends AnyTextableGuildChannel
    ? string
    : undefined | string

The preferred locale of the guild this interaction was sent from, if applicable.

guildPartial?: T extends AnyTextableGuildChannel
    ? InteractionGuild
    : undefined | InteractionGuild

The partial guild this interaction was sent from, if applicable.

id: string
locale: string

The locale of the invoking user.

member: T extends AnyTextableGuildChannel
    ? Member
    : null | Member

The member associated with the invoking user, if this interaction is sent from a guild.

memberPermissions: T extends AnyTextableGuildChannel
    ? Permission
    : null | Permission

The permissions of the member associated with the invoking user, if this interaction is sent from a guild.

message: Message<T>

The message the interaction is from.

token: string

The token of this interaction.

The type of this interaction.

user: User

The user that invoked this interaction.

version: 1

Read-only property, always 1

Accessors

Methods

  • Defer this interaction with a DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE response. This is an initial response, and more than one initial response cannot be used.

    Parameters

    • Optional flags: number

      The flags to respond with.

    Returns Promise<void>

  • Defer this interaction with a DEFERRED_UPDATE_MESSAGE response. This is an initial response, and more than one initial response cannot be used.

    Parameters

    • Optional flags: number

      The flags to respond with.

    Returns Promise<void>