---
title: "Fetches all global slash commands for the bot."
method: POST
path: "/fetchGlobalSlashCommands"
---

# Fetches all global slash commands for the bot.

`POST /fetchGlobalSlashCommands`

This function retrieves a list of all global slash commands registered for the bot. It returns a Promise that resolves to an array of slash command objects. This allows developers to easily access and manage the bot's global slash commands.

## Request body

- object
  - `body` object — Body of the fetchGlobalSlashCommands 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`

Successful response

- object[]
  - `id` string — Unique identifier for the slash command
  - `name` string — Name of the slash command
  - `description` string — Description of the slash command
  - `options` object[] — Array of command options

## Other responses

- `400` — Bad Request - Client error
- `401` — Unauthorized - Authentication failed
- `403` — Forbidden - Insufficient permissions
- `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)
