Class CommandInteraction<T, C>

Represents a command interaction.

Type Parameters

Hierarchy (view full)

Constructors

Properties

acknowledged: boolean

If this interaction has been acknowledged.

appPermissions: Permission

The permissions the bot has in the channel this interaction was sent from. If in a dm/group dm, this will contain ATTACH_FILES, EMBED_LINKS, and MENTION_EVERYONE. In addition, USE_EXTERNAL_EMOJIS will be included for DMs with the app's bot user.

application?: ClientApplication

The application this interaction is for.

applicationID: string

The ID of the application this interaction is for.

authorizingIntegrationOwners: AuthorizingIntegrationOwners

Details about the authorizing user or server for the installation(s) relevant to the interaction. See Discord's docs for more information.

channelID: string

The ID of the channel this interaction was sent from.

The context 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.

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

  • Show a "premium required" response to the user. This is an initial response, and more than one initial response cannot be used.

    Returns Promise<void>

    Deprecated

    The Constants~InteractionTypes.PREMIUM_REQUIRED | PREMIUM_REQUIRED interaction response type is now deprecated in favor of using custom premium buttons.