Discord Guide
Welcome to the Discord Guide! This guide shows you how to create a Discord bot. You'll learn how to get the bot's token, set permissions, turn on developer mode, copy IDs, create webhooks.
Creating Discord Bot
Go to the Discord Developer Portal
Click here to open the Discord Developer Portal.
Sign in using your Discord credentials.
Bot Token, Permissions & Intents
Enable Important Bot Intents
In the "Bot" tab, scroll to "Privileged Gateway Intents":
Toggle ON "Message Content Intent" → Allows the bot to read messages (for commands, moderation, etc.).
Toggle ON "Server Members Intent" → Allows the bot to see members in the server (needed for welcoming users or role management).
Toggle ON "Presence Intent" → Allows the bot to detect user status (online, offline, etc.).
Click Save Changes.
Set Bot Permissions & Generate an Invite Link
Go to "OAuth2" → "URL Generator".
Under Scopes, select "Bot".
Under Bot Permissions, select only what your bot needs:
For example: Read Messages, Manage Messages, or Manage Roles.
Avoid using Administrator permissions unless absolutely necessary.
Copy the generated URL.
Tips to Keep Your Bot Secured
Keep your bot token secret and only share it with trusted people. If someone gets your token, they can control your bot.
If your token is leaked, reset it immediately in the Developer Portal.
Avoid giving Administrator permissions unless absolutely essential.
Check bot permissions often to make sure they only have access to what they need.
Developer Mode & Copying IDs
Enable Developer Mode
Open Discord → Go to User Settings (⚙️).
Scroll down to Advanced settings.
Toggle ON Developer Mode.
Copy User ID
Right-click on a user’s name.
Click "Copy ID".
Copy Role ID
Go to Server Settings → Roles.
Right-click on a role.
Click "Copy ID".
Copy Server (Guild) ID
Right-click on the server’s name (top-left corner in Discord).
Click "Copy ID".
Create & Setup Webhooks
Tips to Keep Your Webhooks Secured
Keep the webhook URL secret and never share it with anyone. If someone gets access to your webhook URL, they can send fake or malicious messages. Delete and regenerate it immediately if leaked.
Keep the webhook URL private. If leaked, others can use it to send fake or malicious messages.
Delete and regenerate the webhook URL immediately if you suspect it has been compromised.
Restrict access to webhooks by using them only in trusted environments or with trusted users to prevent misuse.
Review and monitor webhook activity periodically to ensure no unauthorized actions are being performed.
Last updated