Skip to content

Orphaned Guild Slash Commands Persist After Application Change #8184

@12jesedi

Description

@12jesedi

Description

I am experiencing persistent duplicate guild-scoped slash commands that cannot be removed via the API.

In a specific server, multiple slash commands appear duplicated. Each duplicate shows a different command ID. Only one set belongs to my active application.

The additional command IDs do not correspond to any existing application in the Developer Portal.

Clearing global commands, clearing guild commands, and forcing guild sync via the API does not remove the duplicates.

These appear to be orphaned guild-scoped application command records that are no longer owned by an active application.

Server ID: 1423821092136554656

Active Application ID: 1459337302089273457

Example duplicate command name: /gamble_audit (and others)

Orphan Command ID: 1477527904186404866

Steps to Reproduce

  1. Register guild-scoped slash commands via the API.
  2. Refactor or materially change command registration (e.g., moving command definitions).
  3. Sync commands again using the API.
  4. Observe duplicate slash commands in the guild.
  5. Attempt to clear commands using:
    • tree.clear_commands(guild=...)
    • tree.clear_commands(guild=None)
    • tree.sync(guild=...)
    • tree.sync()
  6. Observe that duplicate commands persist.

Expected Behavior

Clearing and re-syncing guild commands via the API should remove any outdated or orphaned slash command records.

Only the commands owned by the currently active application should remain visible in the guild.

Current Behavior

Duplicate slash commands persist in the guild.

Each duplicate shows a different command ID.

One command ID belongs to the active application. The other command ID does not correspond to any existing application in the Developer Portal.

The orphaned commands cannot be removed through any available API methods.

Screenshots/Videos

Image
Image
Image

Client and System Information

discord.py (latest stable)
Python 3.12
Commands registered via application command API
Tested on Windows 11 and browser client

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions