Skip to main content
Version: 0.37.57

APIBaseInteraction <Type, Data>

Type parameters

Index

Properties

optionalapp_permissions

app_permissions?: string

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

application_id

application_id: string

ID of the application this interaction is for

optionalchannel

channel?: (Partial<APIGroupDMChannel> & Pick<APIChannel, type | id>) & (Partial<APIDMChannel> & Pick<APIChannel, type | id>) & (Partial<APITextChannel> & Pick<APIChannel, type | id>) & (Partial<APINewsChannel> & Pick<APIChannel, type | id>) & (Partial<APIGuildVoiceChannel> & Pick<APIChannel, type | id>) & (Partial<APIGuildStageVoiceChannel> & Pick<APIChannel, type | id>) & (Partial<APIGuildCategoryChannel> & Pick<APIChannel, type | id>) & (Partial<APIThreadChannel> & Pick<APIChannel, type | id>) & (Partial<APIGuildForumChannel> & Pick<APIChannel, type | id>) & (Partial<APIGuildMediaChannel> & Pick<APIChannel, type | id>)

The channel it was sent from

optionalchannel_id

channel_id?: string

The id of the channel it was sent from

@deprecated

Use APIBaseInteraction#channel instead

optionaldata

data?: Data

The command data payload

optionalguild_id

guild_id?: string

The guild it was sent from

optionalguild_locale

guild_locale?: id | en-US | en-GB | bg | zh-CN | zh-TW | hr | cs | da | nl | fi | fr | de | el | hi | hu | it | ja | ko | lt | no | pl | pt-BR | ro | ru | es-ES | sv-SE | th | tr | uk | vi

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

id

id: string

ID of the interaction

locale

locale: id | en-US | en-GB | bg | zh-CN | zh-TW | hr | cs | da | nl | fi | fr | de | el | hi | hu | it | ja | ko | lt | no | pl | pt-BR | ro | ru | es-ES | sv-SE | th | tr | uk | vi

The selected language of the invoking user

optionalmember

Guild member data for the invoking user, including permissions

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

optionalmessage

message?: APIMessage

For components, the message they were attached to

token

token: string

A continuation token for responding to the interaction

type

type: Type

The type of interaction

optionaluser

user?: APIUser

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

version

version: 1

Read-only property, always 1