Discord Setup¶
This guide is the whole path from zero to a ready server.
Before You Start¶
Check these first:
- you are logged into the right Discord account
- that account has permission to invite bots to the target server
- your Discord account email is verified
- you know which server you want to test first
1. Open the Discord Developer Portal¶
Open:
https://discord.com/developers/applications
Then click New Application.
The application name does not have to be perfect. You can change it later.
2. Create the Bot User¶
Inside the application:
- Open the Bot tab.
- If Discord has not created a bot user yet, create one there.
- Copy the bot token for
brrainzbot setup.
3. Turn On the Required Intents¶
Still in the Bot tab, turn on:
Server Members IntentMessage Content Intent
4. Ignore the Fields You Do Not Need¶
For this self-hosted setup, you can ignore these unless you already know you need them:
Interactions Endpoint URLLinked Roles Verification URLTerms of Service URLPrivacy Policy URL
5. Decide on Public Bot¶
For a normal self-hosted install, keeping Public Bot on is fine.
What it means:
on: other people could invite this bot if they had the invite link and the right Discord permissionsoff: only you or your team can invite it
This does not mean other people can run code on your machine.
6. Generate the Invite Link¶
Open OAuth2 → URL Generator.
Shortcut:
./brrainzbot invite-url --client-id <appId>
If you already ran setup, this also works and will resolve the app ID from the saved bot token:
./brrainzbot invite-url
Under Scopes, select:
bot
Keep the scope simple. You do not need extra scopes for the current welcome flow.
Under Bot Permissions, select all seven required permissions:
View ChannelsRead Message HistorySend MessagesManage MessagesManage RolesManage ChannelsKick Members
If you use the portal generator, copy the generated URL at the bottom.
7. Invite the Bot¶
Open the invite URL in your browser.
Do this once for each server where you want to use the bot:
- choose the server
- authorize the bot
- return to Discord
8. Create the Roles¶
In your Discord server, open:
Server name → Server Settings → Roles
Create these roles:
MEMBER
Recommended model:
@everyone: can look around, but does not grant normal postingMEMBER: grants normal participation
If your server already uses @everyone for normal posting, BrrainzBot can help you move to a real MEMBER role:
./brrainzbot create-member <serverId>
./brrainzbot set-members <serverId>
Use those helper commands after setup. If you leave the MEMBER role blank during first setup, run create-member before doctor.
9. Create #welcome¶
Create a channel called #welcome.
You do not need to post anything there yourself. BrrainzBot will place the persistent welcome post.
Recommended MEMBER model:
@everyone: can view#welcomeMEMBER: cannot view#welcome- the bot itself: must still be able to post in
#welcome
That can be done on #welcome itself or on its parent category if the channel inherits from it.
10. Set Public Channel Permissions¶
Recommended MEMBER model¶
For the public channels you want newcomers to see:
@everyone: can view@everyone: cannot postMEMBER: can post
This is the safer model. New users never get normal posting access until approval.
11. Move the Bot Role Above MEMBER¶
Open the server role list and move the bot role above:
MEMBER
If the bot role is too low, the bot cannot move users between roles.
12. Gather the IDs¶
Turn on Developer Mode in Discord first:
User Settings → Advanced → Developer Mode
Then copy these IDs:
- server ID
#welcomechannel ID- spam honeypot channel ID if you use spam cleanup
MEMBERrole ID- your own Discord user ID
13. Run Setup¶
Back in the terminal:
./brrainzbot setup
If you do not have a real MEMBER role yet, leave that field blank for now.
14. Create or Sync MEMBER if Needed¶
./brrainzbot create-member <serverId>
Skip this if you already entered a real MEMBER role ID in setup.
15. Run Doctor¶
./brrainzbot doctor
Fix anything it reports before you turn the server on.
16. Enable the Server¶
./brrainzbot enable <serverId>
17. Start the Bot¶
./brrainzbot run