How this method works?

How client.application.commands.set() works to deploy commands? and is an alternative for this? https://discordjs.guide/creating-your-bot/command-deployment.html#command-registration
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
6 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
mallusrgreat
mallusrgreat3mo ago
await rest.put( Routes.applicationCommands(clientId), { body: commands }, );
under the hood, this is what client.application.commands.set() does
black
black3mo ago
where can i find these codes "under the hood"? and in specific ...commands.set()
d.js docs
d.js docs3mo ago
:method: ApplicationCommandManager#set() Sets all the commands for this application or guild.
mallusrgreat
mallusrgreat3mo ago
No description
black
black3mo ago
thanks ❤️