Discord error 40041: Application command name already exists
Last verified against Discord Developer Docs - Opcodes and status codes
An application command with that name already existsWhat error 40041 means
Discord rejected a command because another command of the same type in the same scope already uses that name. Command names must be unique per type: you can have a slash command and a user context-menu command both called report, but not two slash commands called report in the same scope.
Note that creating a single command with POST /applications/{application.id}/commands using an existing name does not fail; Discord documents that it overwrites the old command. The error appears in situations that cannot be resolved as an overwrite, most commonly renaming a command with PATCH to a name another command already holds, or a bulk overwrite (PUT) array that contains the same name and type twice.
Duplicate entries in a bulk payload usually come from a loader that reads command files from disk and includes a file twice, or two files that export the same name.
What it looks like
{
"message": "An application command with that name already exists",
"code": 40041
}Why it happens
- Bulk overwrite array includes two commands with the same name and type
- PATCH renames a command to a name already used by another command
- Command loader reads the same file twice or two modules export one name
- Localized default name collides with another command's name
How to fix Discord error 40041
- 1Log the full array you send to the bulk overwrite endpoint and search it for duplicate name and type pairs
- 2Fix the loader so each command module is registered exactly once
- 3For renames, delete or rename the conflicting command first
- 4Re-run registration and confirm GET /applications/{application.id}/commands shows each name once
How to stop it recurring
Validate your command set locally before registering: assert unique name and type pairs in a test. Registering through a single bulk overwrite from one source file keeps the deployed list predictable. Command count and naming limits are on the Discord limits page.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 30032: Maximum number of application commands reachedMaximum number of application commands reached
- 30034: Maximum number of daily application command creates reached (200)Maximum number of daily application command creates has been reached (200)
- 10063: Unknown application commandUnknown application command
- 50035: Invalid form bodyInvalid form body (returned for both application/json and multipart/form-data…
Error 40041 - quick answers
What does Discord error 40041 mean?
Discord rejected a command because another command of the same type in the same scope already uses that name. Command names must be unique per type: you can have a slash command and a user context-menu command both called report , but not two slash commands called report in the same scope.
How do I fix Discord error 40041?
1. Log the full array you send to the bulk overwrite endpoint and search it for duplicate name and type pairs 2. Fix the loader so each command module is registered exactly once 3. For renames, delete or rename the conflicting command first 4. Re-run registration and confirm GET /applications/{application.id}/commands shows each name once
Should I retry after error 40041?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.