-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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
- Register guild-scoped slash commands via the API.
- Refactor or materially change command registration (e.g., moving command definitions).
- Sync commands again using the API.
- Observe duplicate slash commands in the guild.
- Attempt to clear commands using:
- tree.clear_commands(guild=...)
- tree.clear_commands(guild=None)
- tree.sync(guild=...)
- tree.sync()
- 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
Client and System Information
discord.py (latest stable)
Python 3.12
Commands registered via application command API
Tested on Windows 11 and browser client


