Skip to content

Bot Setup

Jerad Berhow edited this page Oct 10, 2026 · 10 revisions

Bot Setup

Creating the Discord application and getting the bot into a server. If you are deploying to a Linux host, do this first, then see Host Installation.

1. Create the Discord application

  1. Go to the Discord Developer Portal and New Application.
  2. Open Bot and copy the token — this is the DISCORD_TOKEN value. Treat it like a password; if it leaks, reset it here.
  3. Open General Information and copy the Application ID — this is CLIENT_ID.

Both values go in hom.env — see Configuration.

Gateway intents

PariahBot needs three intents, none of which are privileged, so there is nothing to toggle in the Developer Portal and no verification to apply for:

Intent Needed for
Guilds Everything
Guild Voice States Temporary voice channels
Guild Messages Message auto-deletion, honeypot, activity XP

The member verification captcha deliberately works from a button in a screening channel rather than listening for join events, specifically so the bot does not need the privileged Guild Members intent.

2. Permissions

There are two sets:

  • Recommended (33 permissions). This is the standard set for running PariahBot. Use it unless you have a reason not to.
  • Required (10 permissions). These are the ones PariahBot's code actually uses. Use this set alone if you want the bot to hold nothing else.

The invite links for both are in step 3.

Required

Omitting one of these only breaks the features beside it; the rest keep working.

Permission Needed for
View Channels Everything
Send Messages Command replies, role menus, alerts, verification and honeypot messages
Embed Links Embeds, which nearly every command replies with
Read Message History /autodelete reading channel backlog and pins; re-finding messages the bot posted earlier
Manage Channels Creating/deleting channels and categories (/voice, temp channels, /alerts default channel, /security channels); /vc name and /vc limit
Manage Roles Channel permission overwrites, creating roles via /setup, granting roles for role menus and the captcha
Move Members Moving members into their temp voice channel; /vc kick
Connect /vc lock and /vc unlock — the bot grants itself Connect before denying it to @everyone, and Discord only lets it set a permission bit it already holds
Manage Messages /autodelete deleting other people's messages
Ban Members The /security honeypot — required even for its default "remove", which is a softban (ban then immediate unban). Kick Members is not needed

Recommended

All 10 required permissions, plus these 23. PariahBot's code doesn't use any of the 23 today, so removing one won't break a feature.

Area Also granted
General View Audit Log, Create Invite, Change Nickname, Manage Nicknames
Moderation Kick Members, Timeout Members
Text Mention @everyone, @here and All Roles¹, Attach Files, Add Reactions, Pin Messages, Bypass Slowmode, Send Voice Messages, Create Polls, Send Messages in Threads, Create Public Threads, Create Private Threads, Manage Threads and Posts
Voice Speak, Mute Members, Deafen Members, Set Voice Channel Status
Apps Use Application Commands, Use Activities

¹ This is the one extra that matters to a feature: /streamers and /instagram need it to ping a role that isn't set to Allow anyone to @mention this role.

Deliberately left out: Use External Stickers, Request to Speak, Use Soundboard, Use External Sounds, Use External Apps, and everything that would give the bot control of the server itself (Administrator, Manage Server, Manage Webhooks, Manage Expressions, Manage Events).

3. Invite the bot

Build the invite URL with the Application ID you copied in step 1.

Recommended:

https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&permissions=7672240169807063&scope=bot%20applications.commands

Required only:

https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&permissions=286354452&scope=bot%20applications.commands

The permissions number encodes exactly the set described in step 2: 7672240169807063 for recommended, 286354452 for required only. Scopes are bot (join the server) and applications.commands (register slash commands). Both are required; without the second one the bot joins but its commands never appear.

You can also generate this from the Developer Portal under OAuth2 → URL Generator by ticking the same scopes and permissions, if you would rather not hand-build the URL.

4. Set up the bot's role

Use the bot's own role

The invite creates a role named PariahBot, holding exactly the permissions the link asked for. Keep the bot's permissions on that role:

  • Don't put the bot in a shared role like "Bots", and don't give it a role made for something else. Shared roles usually carry permissions meant for other bots, so PariahBot ends up holding more than it needs. A change made for another bot can also break PariahBot without anyone noticing.
  • Don't delete its role. It's what the invite set up. If it's gone, the bot only has whatever other roles happen to give it, and loses everything if those are removed. To fix that, kick the bot and invite it again with the link above.
  • To change its permissions later, edit the PariahBot role, or kick the bot and re-invite it with a different link.

Fix the role hierarchy

Do this immediately after inviting. In Server Settings → Roles, drag PariahBot above:

  • the member role the captcha grants
  • any role offered through a role menu
  • anyone the honeypot should be able to remove

Discord ignores a bot trying to act on anyone whose highest role is above its own, regardless of permissions. /security captcha setup checks this up front and refuses with an explanation; the other features just fail at the moment you use them, which is much harder to diagnose.

5. Register the commands

npm run deploy

Whether commands appear in one server or all of them depends on GUILD_ID:

GUILD_ID Result
Set to a server ID Registers to that server only, instantly. Ideal while developing.
Empty or absent Registers globally — every server the bot is in. Can take up to an hour to appear.

Re-run npm run deploy after adding, removing or changing any command definition. See Troubleshooting if commands don't show up.

Next

Clone this wiki locally