Interface APIBaseInteraction<Type, Data>

interface APIBaseInteraction<Type extends InteractionType, Data> {
    app_permissions: string;
    application_id: string;
    attachment_size_limit: number;
    authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
    channel?: Partial<APIChannel> & Pick<APIChannel, "type" | "id">;
    channel_id?: string;
    context?: InteractionContextType;
    data?: Data;
    entitlements: APIEntitlement[];
    guild?: APIPartialInteractionGuild;
    guild_id?: string;
    guild_locale?: Locale;
    id: string;
    locale: Locale;
    member?: APIInteractionGuildMember;
    message?: APIMessage;
    token: string;
    type: Type;
    user?: APIUser;
    version: 1;
}

Type Parameters

Properties

app_permissions: string

Bitwise set of permissions the app or bot has within the channel the interaction was sent from

application_id: string

ID of the application this interaction is for

attachment_size_limit: number

Attachment size limit in bytes

authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap

Mapping of installation contexts that the interaction was authorized for to related user or guild IDs.

channel?: Partial<APIChannel> & Pick<APIChannel, "type" | "id">

The channel it was sent from

channel_id?: string

The id of the channel it was sent from

Use APIBaseInteraction.channel instead

Context where the interaction was triggered from

data?: Data

The command data payload

entitlements: APIEntitlement[]

For monetized apps, any entitlements for the invoking user, representing access to premium SKUs

Guild that the interaction was sent from

guild_id?: string

Guild that the interaction was sent from

guild_locale?: Locale

The guild's preferred locale, if invoked in a guild

id: string

ID of the interaction

locale: Locale

The selected language of the invoking user

Guild member data for the invoking user, including permissions

This is only sent when an interaction is invoked in a guild

message?: APIMessage

For components, the message they were attached to

token: string

A continuation token for responding to the interaction

type: Type

The type of interaction

user?: APIUser

User object for the invoking user, if invoked in a DM

version: 1

Read-only property, always 1