Failed to overwrite global application commands: Command name is invalid

Hello! I am having an incredibly frustrating time adding a new slash command to my bot. The command is fairly straight forward however when I try to start the bot I get the error in the title. I cannot for the life of me seem to work out why it should throw this error and was hoping to find some helpful advice here!
> node dist/index.js

2025-03-07 11:28:10 - INFO - Logging in
prisma:info Starting a mysql pool with 17 connections.
Connected to database
2025-03-07 11:28:11 - INFO - ApplicationCommandRegistries: Initializing...
1.0.0
[+] Gateway
</> DEVELOPMENT MODE
2025-03-07 11:28:11 - INFO - ├─ Loaded 27 arguments.
2025-03-07 11:28:11 - INFO - ├─ Loaded 4 commands.
2025-03-07 11:28:11 - INFO - ├─ Loaded 0 interaction-handlers.
2025-03-07 11:28:11 - INFO - ├─ Loaded 38 listeners.
2025-03-07 11:28:11 - INFO - ├─ Loaded 15 preconditions.
2025-03-07 11:28:11 - INFO - └─ Loaded 1 scheduled-tasks.
2025-03-07 11:28:11 - DEBUG - recruiterchannel
2025-03-07 11:28:11 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 6 commands
2025-03-07 11:28:11 - INFO - logged in
2025-03-07 11:28:11 - ERROR - ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body
2025-03-07 11:28:11 - ERROR - 1.options[0].name[APPLICATION_COMMAND_INVALID_NAME]: Command name is invalid
2025-03-07 11:28:11 - ERROR - at handleErrors (/Users/montymonro/Projects/unhinged/node_modules/@discordjs/rest/dist/index.js:727:13)
...
> node dist/index.js

2025-03-07 11:28:10 - INFO - Logging in
prisma:info Starting a mysql pool with 17 connections.
Connected to database
2025-03-07 11:28:11 - INFO - ApplicationCommandRegistries: Initializing...
1.0.0
[+] Gateway
</> DEVELOPMENT MODE
2025-03-07 11:28:11 - INFO - ├─ Loaded 27 arguments.
2025-03-07 11:28:11 - INFO - ├─ Loaded 4 commands.
2025-03-07 11:28:11 - INFO - ├─ Loaded 0 interaction-handlers.
2025-03-07 11:28:11 - INFO - ├─ Loaded 38 listeners.
2025-03-07 11:28:11 - INFO - ├─ Loaded 15 preconditions.
2025-03-07 11:28:11 - INFO - └─ Loaded 1 scheduled-tasks.
2025-03-07 11:28:11 - DEBUG - recruiterchannel
2025-03-07 11:28:11 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 6 commands
2025-03-07 11:28:11 - INFO - logged in
2025-03-07 11:28:11 - ERROR - ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body
2025-03-07 11:28:11 - ERROR - 1.options[0].name[APPLICATION_COMMAND_INVALID_NAME]: Command name is invalid
2025-03-07 11:28:11 - ERROR - at handleErrors (/Users/montymonro/Projects/unhinged/node_modules/@discordjs/rest/dist/index.js:727:13)
...
No description
Solution:
I found the issue, its not only command names that need to be lowercase, its also argument names or option names too
Jump to solution
8 Replies
Tasemu
TasemuOP4w ago
I can't seem to be able to post my code here, maybe someone needs to reply first lol Thanks in advance for any and all help!
Ben
Ben4w ago
What’s the name of the file?
Tasemu
TasemuOP4w ago
RecruiterChannel.ts
Ben
Ben4w ago
A commands name can only have lowercase letters. You should probably set name to something other than just this.name since that will be RecruterChannel
Tasemu
TasemuOP4w ago
I'm logging the name and its recruiterchannel i believe the framework transforms it
Ben
Ben4w ago
Oh I didn’t know that. I’m not sure then
Tasemu
TasemuOP4w ago
Bummer but thanks 🙂 I'm so confused with this issue, nothing i see could be causing this error :/
Solution
Tasemu
Tasemu4w ago
I found the issue, its not only command names that need to be lowercase, its also argument names or option names too

Did you find this page helpful?