Learn Before
Get your guild's ID
A guild (server) ID is required to run a bot with slash commands. If launching a bot globally you would need some extra steps to incorporate many guilds into your bot. In our case we will just be deploying our bot to one server. Complete the following steps to get the ID of the server you wish to deploy your bot in.
-
Go to Discord settings.
-
Head over to the "Advanced" tab under "App Settings".
-
Enable "Developer Mode".
-
Go back to your server list, right click your server, and press "Copy ID".
(optional but recommended) Create an environmental variable for your guild ID in case you want to test the same bot on two different servers. This would simplify the process by requiring you to change only your local environment rather than modifying the code itself.
0
1
Tags
Python Programming Language
Data Science