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!
> [email protected] start> node dist/index.js2025-03-07 11:28:10 - INFO - Logging inprisma:info Starting a mysql pool with 17 connections.Connected to database2025-03-07 11:28:11 - INFO - ApplicationCommandRegistries: Initializing...1.0.0 [+] Gateway </> DEVELOPMENT MODE2025-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 - recruiterchannel2025-03-07 11:28:11 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 6 commands2025-03-07 11:28:11 - INFO - logged in2025-03-07 11:28:11 - ERROR - ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body2025-03-07 11:28:11 - ERROR - 1.options[0].name[APPLICATION_COMMAND_INVALID_NAME]: Command name is invalid2025-03-07 11:28:11 - ERROR - at handleErrors (/Users/montymonro/Projects/unhinged/node_modules/@discordjs/rest/dist/index.js:727:13)...
> [email protected] start> node dist/index.js2025-03-07 11:28:10 - INFO - Logging inprisma:info Starting a mysql pool with 17 connections.Connected to database2025-03-07 11:28:11 - INFO - ApplicationCommandRegistries: Initializing...1.0.0 [+] Gateway </> DEVELOPMENT MODE2025-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 - recruiterchannel2025-03-07 11:28:11 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 6 commands2025-03-07 11:28:11 - INFO - logged in2025-03-07 11:28:11 - ERROR - ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body2025-03-07 11:28:11 - ERROR - 1.options[0].name[APPLICATION_COMMAND_INVALID_NAME]: Command name is invalid2025-03-07 11:28:11 - ERROR - at handleErrors (/Users/montymonro/Projects/unhinged/node_modules/@discordjs/rest/dist/index.js:727:13)...
Solution
I found the issue, its not only command names that need to be lowercase, its also argument names or option names too