We are introducing a new contexts
field to application commands to
allow more granular control of where application commands may be used.
If not specified, the default is currently {GUILD, BOT_DM}
When this new field is present, the dm_permission
field is ignored by
our systems for permission calculation.
Field | Type | Description | Valid Types |
---|---|---|---|
contexts | array of Application Command Context Types | Indicates which contexts this command may be used in | all |
Name | Value | Description |
---|---|---|
GUILD | 0 | This command can be used within a Guild |
BOT_DM | 1 | This command can be used within a DM with the application's bot |
PRIVATE_CHANNEL | 2 | This command can be used within DMs and Group DMs with users |
Why can this not be a flag?