error

Yesterday I had this error which was fixed by simply updating the framework
TypeError: Cannot read properties of undefined (reading 'parseConstructorPreConditionsRunIn')
TypeError: Cannot read properties of undefined (reading 'parseConstructorPreConditionsRunIn')
However now I have this error on the bot's start up
[ERROR] ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body
6[APPLICATION_COMMANDS_DUPLICATE_NAME]: Application command names must be unique
[ERROR] ApplicationCommandRegistries(BulkOverwrite) Failed to overwrite global application commands DiscordAPIError[50035]: Invalid Form Body
6[APPLICATION_COMMANDS_DUPLICATE_NAME]: Application command names must be unique
This all happend after creating a warn command with subcommands, i'm also sure there's also no other application command with the name warn
Solution:
This is the pitfall of not using either idHints https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/registering-chat-input-commands#idhints or using bulk overwrite https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/setting-global-behavior-when-not-identical So you should do either of those and in case of the former prune all your currently registered commands using whichever way to unregister commands. FWIW the logging when you first register a new command would’ve told you to add the ids to idHints....
Sapphire Framework
Configuring the global behavior when commands are not identical | S...
Configuring the global behavior is easy! You just need to import the
Sapphire Framework
Registering Chat Input Commands | Sapphire
To register a Chat Input Command (also known as a Slash Command) with Discord, you need to acquire an application
Jump to solution
4 Replies
Solution
Favna
Favna•7mo ago
This is the pitfall of not using either idHints https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/registering-chat-input-commands#idhints or using bulk overwrite https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/setting-global-behavior-when-not-identical So you should do either of those and in case of the former prune all your currently registered commands using whichever way to unregister commands. FWIW the logging when you first register a new command would’ve told you to add the ids to idHints.
Sapphire Framework
Configuring the global behavior when commands are not identical | S...
Configuring the global behavior is easy! You just need to import the
Sapphire Framework
Registering Chat Input Commands | Sapphire
To register a Chat Input Command (also known as a Slash Command) with Discord, you need to acquire an application
-Carlosđź‘‘
-Carlos👑•7mo ago
i'm already using BulkOverwrite have been using it probably for 1 month or more
Favna
Favna•7mo ago
In that case you simply have 2 commands with the same name If you’re using typescript and you moved a file be wary that compiled files do not get automatically deleted when rerunning tsc, so manually delete your dist instead.
-Carlosđź‘‘
-Carlos👑•7mo ago
there was no duplicated command, just had to reload vsc since sometimes stuff like this happends