tether developers
Contents

API reference

Slash commands

A bot's application commands, global and per server.

Get Global Application Commands

GET/applications/{application.id}/commandsBots only

The global slash commands the bot has registered.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).

Response

200 a list of APIApplicationCommand

[
  {
    "id": "107441200000000600",
    "type": 1,
    "application_id": "107441200000000300",
    "name": "ping",
    "description": "Replies with pong",
    "options": [],
    "default_member_permissions": null,
    "dm_permission": false,
    "contexts": [
      0
    ],
    "integration_types": [
      0
    ],
    "nsfw": false,
    "version": "107441200000000601"
  }
]

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.

Discord

Like Discord’s Get Global Application Commands, with differences.

Answers the bot only (applications.commands app tokens do not exist); with_localizations is ignored.

Create Global Application Command

POST/applications/{application.id}/commandsBots only

Register a global command. A command with the same name and type is overwritten (200), a new one is 201.

Discord's rules and limits: a / command's name is 1 to 32 lowercase letters, digits, - or _; its description 1 to 100 characters; up to 25 options, each with Discord's type (1 sub command, 2 group, 3 string, 4 integer, 5 boolean, 6 user, 7 channel, 8 role, 9 mentionable, 10 number, 11 attachment); required options before optional ones; up to 25 choices (not together with autocomplete); 8000 characters of names, descriptions and choices in one command. default_member_permissions (a decimal string; null: everyone, "0": administrators only) decides who sees the command. Localizations are accepted and ignored. Commands of a server hide the global command of the same name.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).

Body

application/json

namestring · 1 to 32 charactersrequired
name_localizationsobject | null
descriptionstring | null · max 100 characters
description_localizationsobject | null
optionsarray of object | null · max 25 items
default_member_permissionsstring | integer | null
dm_permissionboolean | null
default_permissionboolean | null
contextsarray of integer | null · max 3 items
integration_typesarray of integer | null · max 2 items
nsfwboolean | null
type1 | 2 | 3 | null

Example request

{
  "name": "ping",
  "description": "Replies with pong",
  "options": [
    {
      "type": 3,
      "name": "text",
      "description": "Something to echo back",
      "required": false
    }
  ]
}

Response

201 APIApplicationCommand

200 when it overwrote a command of the same name and type.

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

Like Discord’s Create Global Application Command, with differences.

Chat input commands run from the app's / menu; user and message (context menu) commands from Apps in the menu of a person or a message. contexts is server only.

Bulk Overwrite Global Application Commands

PUT/applications/{application.id}/commandsBots only

Replace every global command with this list. A command with the same name and type keeps its id; the others are deleted.

This is what discord.py's tree.sync() and discord.js's application.commands.set() send.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).

Body

application/json

{
  "maxItems": 110,
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      },
      "name_localizations": {
        "anyOf": [
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 100
          },
          {
            "type": "null"
          }
        ]
      },
      "description_localizations": {
        "anyOf": [
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "options": {
        "anyOf": [
          {
            "maxItems": 25,
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "default_member_permissions": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,20}$"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "dm_permission": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "default_permission": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "contexts": {
        "anyOf": [
          {
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "integration_types": {
        "anyOf": [
          {
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "nsfw": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "type": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "number",
                "const": 1
              },
              {
                "type": "number",
                "const": 2
              },
              {
                "type": "number",
                "const": 3
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "id": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^\\d{1,20}$"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "name"
    ]
  },
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "minimum": 1,
          "maximum": 11
        },
        "name": {
          "type": "string",
          "pattern": "^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}$"
        },
        "name_localizations": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "description_localizations": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "required": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "choices": {
          "anyOf": [
            {
              "maxItems": 25,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "name_localizations": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "options": {
          "anyOf": [
            {
              "maxItems": 25,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "channel_types": {
          "anyOf": [
            {
              "maxItems": 32,
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 64
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "min_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "min_length": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 6000
            },
            {
              "type": "null"
            }
          ]
        },
        "max_length": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 6000
            },
            {
              "type": "null"
            }
          ]
        },
        "autocomplete": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "name",
        "description"
      ]
    }
  }
}

Example request

[
  {
    "name": "ping",
    "description": "Replies with pong",
    "options": [
      {
        "type": 3,
        "name": "text",
        "description": "Something to echo back",
        "required": false
      }
    ]
  }
]

Response

200 a list of APIApplicationCommand

[
  {
    "id": "107441200000000600",
    "type": 1,
    "application_id": "107441200000000300",
    "name": "ping",
    "description": "Replies with pong",
    "options": [],
    "default_member_permissions": null,
    "dm_permission": false,
    "contexts": [
      0
    ],
    "integration_types": [
      0
    ],
    "nsfw": false,
    "version": "107441200000000601"
  }
]

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Bulk Overwrite Global Application Commands.

Get Global Application Command

GET/applications/{application.id}/commands/{command.id}Bots only

One global command.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
command.id
A snowflake id.

Response

200 APIApplicationCommand

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.

Discord

The same as Discord’s Get Global Application Command.

Edit Global Application Command

PATCH/applications/{application.id}/commands/{command.id}Bots only

Change a global command. A new options replaces all of them.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
command.id
A snowflake id.

Body

application/json

namestring · 1 to 32 characters
name_localizationsobject | null
descriptionstring | null · max 100 characters
description_localizationsobject | null
optionsarray of object | null · max 25 items
default_member_permissionsstring | integer | null
dm_permissionboolean | null
default_permissionboolean | null
contextsarray of integer | null · max 3 items
integration_typesarray of integer | null · max 2 items
nsfwboolean | null

Example request

{
  "description": "Replies with pong, quickly"
}

Response

200 APIApplicationCommand

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Edit Global Application Command.

Delete Global Application Command

DELETE/applications/{application.id}/commands/{command.id}Bots only

Delete a global command.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
command.id
A snowflake id.

Response

204 no body

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Delete Global Application Command.

Get Guild Application Commands

GET/applications/{application.id}/guilds/{guild.id}/commandsBots only

The server slash commands the bot has registered.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.

Response

200 a list of APIApplicationCommand

[
  {
    "id": "107441200000000600",
    "type": 1,
    "application_id": "107441200000000300",
    "name": "ping",
    "description": "Replies with pong",
    "options": [],
    "default_member_permissions": null,
    "dm_permission": false,
    "contexts": [
      0
    ],
    "integration_types": [
      0
    ],
    "nsfw": false,
    "version": "107441200000000601"
  }
]

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Discord

Like Discord’s Get Guild Application Commands, with differences.

Answers the bot only (applications.commands app tokens do not exist); with_localizations is ignored.

Create Guild Application Command

POST/applications/{application.id}/guilds/{guild.id}/commandsBots only

Register a server command. A command with the same name and type is overwritten (200), a new one is 201.

Discord's rules and limits: a / command's name is 1 to 32 lowercase letters, digits, - or _; its description 1 to 100 characters; up to 25 options, each with Discord's type (1 sub command, 2 group, 3 string, 4 integer, 5 boolean, 6 user, 7 channel, 8 role, 9 mentionable, 10 number, 11 attachment); required options before optional ones; up to 25 choices (not together with autocomplete); 8000 characters of names, descriptions and choices in one command. default_member_permissions (a decimal string; null: everyone, "0": administrators only) decides who sees the command. Localizations are accepted and ignored. Commands of a server hide the global command of the same name.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.

Body

application/json

namestring · 1 to 32 charactersrequired
name_localizationsobject | null
descriptionstring | null · max 100 characters
description_localizationsobject | null
optionsarray of object | null · max 25 items
default_member_permissionsstring | integer | null
dm_permissionboolean | null
default_permissionboolean | null
contextsarray of integer | null · max 3 items
integration_typesarray of integer | null · max 2 items
nsfwboolean | null
type1 | 2 | 3 | null

Example request

{
  "name": "ping",
  "description": "Replies with pong",
  "options": [
    {
      "type": 3,
      "name": "text",
      "description": "Something to echo back",
      "required": false
    }
  ]
}

Response

201 APIApplicationCommand

200 when it overwrote a command of the same name and type.

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

Like Discord’s Create Guild Application Command, with differences.

Chat input commands run from the app's / menu; user and message (context menu) commands from Apps in the menu of a person or a message. contexts is server only.

Bulk Overwrite Guild Application Commands

PUT/applications/{application.id}/guilds/{guild.id}/commandsBots only

Replace every server command with this list. A command with the same name and type keeps its id; the others are deleted.

This is what discord.py's tree.sync() and discord.js's application.commands.set() send.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.

Body

application/json

{
  "maxItems": 110,
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      },
      "name_localizations": {
        "anyOf": [
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 100
          },
          {
            "type": "null"
          }
        ]
      },
      "description_localizations": {
        "anyOf": [
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "options": {
        "anyOf": [
          {
            "maxItems": 25,
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "default_member_permissions": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{1,20}$"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "dm_permission": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "default_permission": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "contexts": {
        "anyOf": [
          {
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "integration_types": {
        "anyOf": [
          {
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "nsfw": {
        "type": [
          "boolean",
          "null"
        ]
      },
      "type": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "number",
                "const": 1
              },
              {
                "type": "number",
                "const": 2
              },
              {
                "type": "number",
                "const": 3
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "id": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^\\d{1,20}$"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "name"
    ]
  },
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "minimum": 1,
          "maximum": 11
        },
        "name": {
          "type": "string",
          "pattern": "^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}$"
        },
        "name_localizations": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "description_localizations": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "required": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "choices": {
          "anyOf": [
            {
              "maxItems": 25,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "name_localizations": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "options": {
          "anyOf": [
            {
              "maxItems": 25,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "channel_types": {
          "anyOf": [
            {
              "maxItems": 32,
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 64
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "min_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "min_length": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 6000
            },
            {
              "type": "null"
            }
          ]
        },
        "max_length": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 6000
            },
            {
              "type": "null"
            }
          ]
        },
        "autocomplete": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "name",
        "description"
      ]
    }
  }
}

Example request

[
  {
    "name": "ping",
    "description": "Replies with pong",
    "options": [
      {
        "type": 3,
        "name": "text",
        "description": "Something to echo back",
        "required": false
      }
    ]
  }
]

Response

200 a list of APIApplicationCommand

[
  {
    "id": "107441200000000600",
    "type": 1,
    "application_id": "107441200000000300",
    "name": "ping",
    "description": "Replies with pong",
    "options": [],
    "default_member_permissions": null,
    "dm_permission": false,
    "contexts": [
      0
    ],
    "integration_types": [
      0
    ],
    "nsfw": false,
    "version": "107441200000000601"
  }
]

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Bulk Overwrite Guild Application Commands.

Get Guild Application Command

GET/applications/{application.id}/guilds/{guild.id}/commands/{command.id}Bots only

One server command.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.
command.id
A snowflake id.

Response

200 APIApplicationCommand

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Discord

The same as Discord’s Get Guild Application Command.

Edit Guild Application Command

PATCH/applications/{application.id}/guilds/{guild.id}/commands/{command.id}Bots only

Change a server command. A new options replaces all of them.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.
command.id
A snowflake id.

Body

application/json

namestring · 1 to 32 characters
name_localizationsobject | null
descriptionstring | null · max 100 characters
description_localizationsobject | null
optionsarray of object | null · max 25 items
default_member_permissionsstring | integer | null
dm_permissionboolean | null
default_permissionboolean | null
contextsarray of integer | null · max 3 items
integration_typesarray of integer | null · max 2 items
nsfwboolean | null

Example request

{
  "description": "Replies with pong, quickly"
}

Response

200 APIApplicationCommand

{
  "id": "107441200000000600",
  "type": 1,
  "application_id": "107441200000000300",
  "name": "ping",
  "description": "Replies with pong",
  "options": [],
  "default_member_permissions": null,
  "dm_permission": false,
  "contexts": [
    0
  ],
  "integration_types": [
    0
  ],
  "nsfw": false,
  "version": "107441200000000601"
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
MAX_APPLICATION_COMMANDS30032 · HTTP 400
More than 100 / commands (or 15 user or 15 message commands) in this scope.
INVALID_FORM_BODY50035 · HTTP 400
A name, description, option or choice breaks Discord's rules; errors has the path of the field.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Edit Guild Application Command.

Delete Guild Application Command

DELETE/applications/{application.id}/guilds/{guild.id}/commands/{command.id}Bots only

Delete a server command.

Path parameters

application.id
The application id, which is your bot's id (READY's application.id).
guild.id
A snowflake id.
command.id
A snowflake id.

Response

204 no body

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only a bot can register commands.
UNKNOWN_APPLICATION10002 · HTTP 404
The application id is not the bot's own.
UNKNOWN_APPLICATION_COMMAND10063 · HTTP 404
There is no such command in this scope.
MISSING_ACCESS50001 · HTTP 403
The bot is not in that server.

Rate limits

applicationCommandWritePerBotbucket 9f154b4b
40 per 60 seconds, counted per user. See Rate limits.

Discord

The same as Discord’s Delete Guild Application Command.

Get Application Command Index

GET/channels/{channel.id}/application-command-indexPeople only

The / commands a person may run in a channel: the server's own, then each bot's.

This is what the app's / menu asks for. It filters with the same permission rules as running a command: a bot's command shows only if the bot can see the channel and the person meets its default_member_permissions. Useful to check that your commands arrived, as a person.

Permissions needed

VIEW_CHANNELbit 1024
View channels

Path parameters

channel.id
A snowflake id.

Response

200 APIApplicationCommandIndex

{
  "application_commands": [
    {
      "id": "107441200000000600",
      "type": 1,
      "application_id": "107441200000000300",
      "name": "ping",
      "description": "Replies with pong",
      "options": [],
      "default_member_permissions": null,
      "dm_permission": false,
      "contexts": [
        0
      ],
      "integration_types": [
        0
      ],
      "nsfw": false,
      "version": "107441200000000601"
    }
  ],
  "applications": [
    {
      "id": "107441200000000300",
      "name": "groove",
      "icon": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
      "description": "Plays music.",
      "bot_id": "107441200000000300"
    }
  ]
}

Errors

UNKNOWN_CHANNEL10003 · HTTP 404
The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403
You cannot see the channel.

Discord

Like Discord’s Get Application Command Index, with differences.

Discord's client route, answered only for people.

Get Current Application

GET/applications/@meBots only

The bot's own application. A bot is its own application, so the id is the bot's id.

Also at /oauth2/applications/@me, which older libraries call (discord.py does at login). icon is always null, verify_key is a placeholder (tether has no HTTP interactions endpoint) and flags are Discord's limited privileged-intent bits; tether does not gate intents. player says whether the bot is marked as a music bot. A person gets 403 20002.

Response

200 APIApplication

{
  "id": "107441200000000300",
  "name": "groove",
  "icon": null,
  "description": "Plays music in voice channels.",
  "rpc_origins": [],
  "bot_public": false,
  "bot_require_code_grant": false,
  "bot": {
    "id": "107441200000000300",
    "username": "groove",
    "discriminator": "0",
    "global_name": null,
    "avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
    "banner": null,
    "accent_color": null,
    "bot": true,
    "public_flags": 0
  },
  "owner": {
    "id": "107441200000000200",
    "username": "josh",
    "discriminator": "0",
    "global_name": "Josh",
    "avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
    "banner": null,
    "accent_color": null,
    "bot": false,
    "public_flags": 0
  },
  "verify_key": "0000000000000000000000000000000000000000000000000000000000000000",
  "team": null,
  "flags": 565248,
  "tags": [],
  "approximate_guild_count": 2,
  "player": false
}

Errors

ONLY_BOTS_CAN_USE_ENDPOINT20002 · HTTP 403
A person's token was used: only bots have an application.

Discord

Like Discord’s Get Current Application, with differences.

icon is null; verify_key is a placeholder; player is tether's.