Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App command integration_types/contexts nullability #6765

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/interactions/Application_Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Application commands are native ways to interact with apps in the Discord client
| dm_permission? | boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | all |
| default_permission? | ?boolean | Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true` | all |
| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands), defaults to `false` | all |
| integration_types | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL` (`0`) | all |
| contexts | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL` (`0`) | all |
| contexts? | ?list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all |
| version | snowflake | Autoincrementing version identifier updated during substantial record changes | all |

> danger
Expand Down Expand Up @@ -1100,8 +1100,8 @@ Create a new global command. Returns `201` if a command with the same name does
| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set |
| dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. |
| default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available | all |
| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used | all |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available |
| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used |
| type? | one of [application command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | Type of command, defaults `1` if not set |
| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) |

Expand All @@ -1128,8 +1128,8 @@ Edit a global command. Returns `200` and an [application command](#DOCS_INTERACT
| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set |
| dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. |
| default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available | all |
| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used | all |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available |
| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used |
| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) |

## Delete Global Application Command % DELETE /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/commands/{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object}
Expand Down Expand Up @@ -1225,8 +1225,8 @@ Takes a list of application commands, overwriting the existing command list for
| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set |
| dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. |
| default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` |
| integration_types | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, defaults to `GUILD_INSTALL` (`[0]`) | all |
| contexts | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, defaults to all contexts `[0,1,2]` | all |
| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, defaults to `GUILD_INSTALL` (`[0]`) |
| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, defaults to all contexts `[0,1,2]` |
| type? | one of [application command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | Type of command, defaults `1` if not set |
| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) |

Expand Down