Bamboo Bot

Guides › Discord

How to make a Discord bot

About 6 minutes. Free - Discord doesn't charge for bots.

Every Discord bot is an application you create in Discord's developer portal. The application gives you a secret token - the bot's password - and an invite link that adds the bot to your server. This guide covers the three places people usually get stuck: the token, the intents and the permissions.

1. Create the application

  1. Go to discord.com/developers/applications and sign in.
  2. Press New Application, give it the name your members will see, accept the terms and create it.
  3. Optional: upload an icon on the General Information page - it becomes the bot's avatar.

2. Get the token

Open the Bot page and press Reset Token. Copy it straight into your bot's Connect page. Discord shows a token only once; if you lose it, reset it again (the old one stops working).

Keep the token secret. Anyone with it controls your bot. Never paste it in a chat, a screenshot or a public code repository. Bamboo Bot stores it encrypted and never shows it again.

3. Turn on the intents

Still on the Bot page, under Privileged Gateway Intents, switch on:

Bots in fewer than 100 servers can switch these on freely; larger bots need Discord's verification.

4. Invite the bot with the right permissions

  1. Open OAuth2 › URL Generator.
  2. Scopes: tick bot and applications.commands.
  3. Bot permissions: Send Messages, Manage Messages (to delete spam), Add Reactions and Read Message History.
  4. Open the generated link, pick your server and authorise.

Avoid giving the bot Administrator. A bot only needs what its rules use; fewer permissions means less damage if a token ever leaks.

5. Find channel IDs

Scheduled posts and welcome messages need a channel ID. In Discord, open User Settings › Advanced and turn on Developer Mode, then right-click any channel and choose Copy Channel ID.

6. Check the role order

Discord only lets a bot moderate members whose highest role is below the bot's role. Drag the bot's role above your member roles in Server Settings › Roles if deleting or moderating doesn't work.

Ideas for your first rules