---
title: "Deletes a slash command from a specific guild."
method: POST
path: "/deleteSlashCommand"
---

# Deletes a slash command from a specific guild.

`POST /deleteSlashCommand`

This function removes a previously registered slash command from a specified guild in Discord. It requires both the guild ID and the command ID to identify and delete the specific command. The operation is asynchronous and returns a Promise that resolves when the deletion is complete.

## Request body

- object
  - `body` object — Body of the deleteSlashCommand sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/discord

## Response `200`

Slash command successfully deleted

- object
  - `message` string

## Other responses

- `400` — Bad request - invalid guild ID or command ID
- `403` — Forbidden - insufficient permissions to delete the command
- `404` — Not found - guild or command does not exist
- `500` — Internal server error

---

[API](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api.md) · [All operations](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/microfox-discord-sdk-api/versions/7cb5b64ae924/schema)
