First, I apologize for the french text... 😅
So, you just have to make a put request to https://discord.com/api/v9/applications/<clientId>/commands with the following JSON and headers that only contains an Authorization with the bot token. /logs toggle and /xp toggle will break the request, and the Discord API will return a 429 Bad Request error. Renaming one of those two subcommands, for exemple /logs enable, will make a successful request.
Code sample
[
{"name":"logs","description":"Permet de gérer le système de logs.","options":[
{"name":"toggle","type":1,"name_localizations":{},"description_localizations":{},"options":[{"name":"toggle","name_localizations":{},"description":"Si le système de logs doit être activé.","description_localizations":{},"type":3,"required":true,"choices":[{"name":"Activer","name_localizations":{},"value":"true"},{"name":"Désactiver","name_localizations":{},"value":"false"}]}],"description":"Permet d'activer ou de désactiver le système de logs."},
{"name":"toggleall","type":1,"name_localizations":{},"description_localizations":{},"options":[{"name":"toggle","name_localizations":{},"description":"Si les évènements doivent être activés.","description_localizations":{},"type":3,"required":true,"choices":[{"name":"Activer tous les évènements","name_localizations":{},"value":"true"},{"name":"Désactiver tous les évènements","name_localizations":{},"value":"false"}]}],"description":"Permet de modifier tous les évènements en même temps."}
],"type":1},
{"name":"xp","description":"Permet de gérer le système d'expérience du serveur.","options":[
{"name":"toggle","type":1,"options":[{"name":"toggle","description":"Si le système d'xp doit être activé.","type":3,"required":true,"choices":[{"name":"Activer","value":"true"},{"name":"Désactiver","value":"false"}]}],"description":"Permet d'activer ou de désactiver le système d'xp."}
],"type":1}
]
Which package is this bug report for?
discord.js
Issue description
First, I apologize for the french text... 😅 So, you just have to make a put request to
https://discord.com/api/v9/applications/<clientId>/commands
with the following JSON and headers that only contains an Authorization with the bot token./logs toggle
and/xp toggle
will break the request, and the Discord API will return a429 Bad Request
error. Renaming one of those two subcommands, for exemple/logs enable
, will make a successful request.Code sample
Package version
13.6.0
Node.js version
16.14.0
Operating system
Windows
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildBans, GuildEmojisAndStickers, GuildIntegrations, GuildWebhooks, GuildInvites, GuildPresences, GuildMessages, GuildMessageReactions
I have tested this issue on a development release
No response