Repository navigation
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.
- Go to the Discord Developer Portal and New Application.
- Open Bot and copy the token — this is the
DISCORD_TOKENvalue. Treat it like a password; if it leaks, reset it here. - Open General Information and copy the Application ID — this is
CLIENT_ID.
Both values go in hom.env — see Configuration.
PariahBot uses four gateway intents, none of them privileged, so there's nothing to switch on here and no verification to apply for. See Permissions for what each one is for.
There are two sets:
- Recommended (34 permissions). The standard set for running PariahBot. Use it unless you have a reason not to.
- Required (11 permissions). Only the ones PariahBot's code actually uses.
Permissions lists every permission, the feature that needs it, and what's deliberately left out. The invite links for both sets are in step 3.
Upgrading an existing bot? Its role only has what its original invite asked for.
/bannedwordsneeds Manage Server, which older invites didn't include. Add it to the PariahBot role in Server Settings → Roles, or re-invite with the new link.
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=7672240169807095&scope=bot%20applications.commands
Required only:
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&permissions=286354484&scope=bot%20applications.commands
The permissions number encodes exactly the set described in
step 2: 7672240169807095 for recommended, 286354484
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.
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.
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.
npm run deployWhether 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.
- Deploying to a server → Host Installation
- Configuring it inside Discord → Server Configuration