Application Commands

Get Global Application Commands

GetAPIApplicationCommands

Fetch all of the global commands for your application.

import { listAppCommands } from "dressed";
const appCommands = await listAppCommands(params?);
Warning

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

Create Global Application Command

PostAPIApplicationCommands

Create a new global command.

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

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

Get Global Application Command

GetAPIApplicationCommand

Fetch a global command for your application.

import { getAppCommand } from "dressed";
const appCommand = await getAppCommand(commandId);

Edit Global Application Command

PatchAPIApplicationCommand

Edit a global command.

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

Delete Global Application Command

DeleteAPIApplicationCommand

Deletes a global command.

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

Bulk Overwrite Global Application Commands

PutAPIApplicationCommands

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

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

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

Get Guild Application 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 Application 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 Application Command

GetAPIApplicationGuildCommand

Fetch a guild command for your application.

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

Edit Guild Application 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 Application Command

DeleteAPIApplicationGuildCommand

Delete a guild command.

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

Bulk Overwrite Guild Application 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.

Get Guild Application Command Permissions

GetAPIGuildApplicationCommandsPermissions

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

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

Get Application 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);

Edit Application 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