Application Commands

List Global Commands

GetAPIApplicationCommands

Fetch all of the global commands for your application.

import { listGlobalCommands } from "dressed";
const globalCommands = await listGlobalCommands(params?);
Warning

The objects returned by this endpoint may be augmented with additional fields if localization is active.

Create Global Command

PostAPIApplicationCommands

Create a new global command.

import { createGlobalCommand } from "dressed";
await createGlobalCommand(data);
Warning

Creating a command with the same name as an existing command for your application will overwrite the old command.

Get Global Command

GetAPIApplicationCommand

Fetch a global command for your application.

import { getGlobalCommand } from "dressed";
const globalCommand = await getGlobalCommand(commandId);

Modify Global Command

PatchAPIApplicationCommand

Edit a global command.

import { modifyGlobalCommand } from "dressed";
await modifyGlobalCommand(commandId, data);

Delete Global Command

DeleteAPIApplicationCommand

Deletes a global command.

import { deleteGlobalCommand } from "dressed";
await deleteGlobalCommand(commandId);

Bulk Overwrite Global Commands

PutAPIApplicationCommands

Takes a list of application commands, overwriting the existing global command list for this application.

import { bulkOverwriteGlobalCommands } from "dressed";
await bulkOverwriteGlobalCommands(data);
Danger

This will overwrite all types of application commands: slash commands, user commands, and message commands.

List Guild Commands

GetAPIApplicationGuildCommands

Fetch all of the guild commands for your application for a specific guild.

import { listGuildCommands } from "dressed";
const guildCommands = await listGuildCommands(guildId, params?);
Warning

The objects returned by this endpoint may be augmented with additional fields if localization is active.

Create Guild Command

PostAPIApplicationGuildCommands

Create a new guild command. New guild commands will be available in the guild immediately.

import { createGuildCommand } from "dressed";
await createGuildCommand(guildId, data);
Danger

Creating a command with the same name as an existing command for your application will overwrite the old command.

Get Guild Command

GetAPIApplicationGuildCommand

Fetch a guild command for your application.

import { getGuildCommand } from "dressed";
const guildCommand = await getGuildCommand(guildId, commandId);

Modify Guild Command

PatchAPIApplicationGuildCommand

Edit a guild command. Updates for guild commands will be available immediately.

import { modifyGuildCommand } from "dressed";
await modifyGuildCommand(guildId, commandId, data);

Delete Guild Command

DeleteAPIApplicationGuildCommand

Delete a guild command.

import { deleteGuildCommand } from "dressed";
await deleteGuildCommand(guildId, commandId);

Bulk Overwrite Guild Commands

PutAPIApplicationGuildCommands

Takes a list of application commands, overwriting the existing command list for this application for the targeted guild.

import { bulkOverwriteGuildCommands } from "dressed";
await bulkOverwriteGuildCommands(guildId, data);
Danger

This will overwrite all types of application commands: slash commands, user commands, and message commands.

List Guild Commands Permissions

GetAPIGuildApplicationCommandsPermissions

Fetches permissions for all commands for your application in a guild.

import { listGuildCommandsPermissions } from "dressed";
const guildCommandsPermissions = await listGuildCommandsPermissions(guildId);

Get Guild Command Permissions

GetAPIApplicationCommandPermissions

Fetches permissions for a specific command for your application in a guild.

import { getGuildCommandPermissions } from "dressed";
const guildCommandPermissions = await getGuildCommandPermissions(guildId, commandId);

Modify Guild Command Permissions

PutAPIApplicationCommandPermissions

Edits command permissions for a specific command for your application in a guild.

import { modifyGuildCommandPermissions } from "dressed";
await modifyGuildCommandPermissions(guildId, commandId, data);
Warning
  • This endpoint will overwrite existing permissions for the command in that guild
  • Deleting or renaming a command will permanently delete all permissions for the command