How to reload a command or multiple slash commands and get their ids

Does anyone know how to reload multiple commands or a slash command and also get them their ids?
Solution:
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Jump to solution
6 Replies
Favna
Favna3mo ago
Use the DiscordJS cache to get the ids: https://discord.js.org/docs/packages/discord.js/14.16.2/ClientApplication:Class#commands I'm not sure what you mean by reload. Sapphire will automatically load and reload commands when you restart the application.
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Starr Rossa
Starr RossaOP2mo ago
Did I mean that there is a way to remove the old commands?
Favna
Favna2mo ago
Idk... Did you?
Solution
Favna
Favna2mo ago
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Starr Rossa
Starr RossaOP2mo ago
Thanks, I needed this
Want results from more Discord servers?
Add your server