-
Hi, I'm working through the basic Discord.js guide here: https://discordjs.guide/creating-your-bot/creating-commands.html#replying-to-commands. I understand how to set up a guild id in my JSON file and use it with rest.put. However, my program that I am writing seems to be a bit different. I want to be able to deploy my Discord bot to multiple servers -- servers with ids that I won't necessarily know at compile time. How can I get the guild id of a server programmatically, and utilize "rest.put(applicationGuildCommands..." with it (as per the link)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'd probably just want to use global commands for deploying if it's for multiple guilds. Check out this part: https://discordjs.guide/interactions/slash-commands.html#global-commands |
Beta Was this translation helpful? Give feedback.
You'd probably just want to use global commands for deploying if it's for multiple guilds. Check out this part: https://discordjs.guide/interactions/slash-commands.html#global-commands