Setting the bot up in Discord
This guide takes you from a running bot to working moderation commands in your servers.
1. The Discord application (once)
At https://discord.com/developers/applications, open your application (or create one), then:
| Page | Setting |
|---|---|
| Bot | Reset Token, then put the token in REVENGEBOT_DISCORD_TOKEN (Coolify) or .env (your PC). Never paste it anywhere else. |
| Bot | Turn on Server Members Intent (for member records, aliases and re-applying mutes when someone rejoins) and Message Content Intent (for auto-mod and the message log). |
| Installation | Set Install Link to None. |
| Bot | Turn Public Bot off, so only you can add the bot to servers. Discord only allows this after the Install Link is None. |
This is for a private install. A bot open to everyone, like the one at revenge.bot, keeps Public Bot on and sets the Install Link to its /invite page instead: see Opening to the public.
If you use the hosted bot at revenge.bot, skip this guide's first two steps: open https://revenge.bot/invite, sign in with Discord, and follow Getting started on Your servers.
2. Invite the bot to each server
Open this link, replacing YOUR_APPLICATION_ID with the Application ID from the application's General Information page:
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&scope=bot+applications.commands&permissions=1116960058550
Pick the server and click Authorize. You need the Manage Server permission in that server.
The permission number grants exactly what the bot uses:
| Permission | Why |
|---|---|
| View Channels, Send Messages, Embed Links | Posting in the mod-log channel |
| Ban Members | /ban, /unban, /softban |
| Kick Members | /kick |
| Moderate Members | /timeout, /untimeout |
| Manage Roles | Giving and removing the mute role, and taking away and giving back a muted member's other roles (only roles below the bot's own) |
| Manage Channels | Hiding channels from the mute role, and /restrict history (it needs Manage Permissions and Read Message History in the channel), and /slowmode (in a thread, Manage Threads) |
| Manage Messages | Removing reactions that use blocked emojis, messages caught by auto-mod or a honeypot, and /purge (which also needs Read Message History) |
| View Audit Log | Recording bans and timeouts made with Discord's own menus, who deleted a message in the message log, and who made each change in the server log |
| Attach Files, Read Message History | Posting deleted messages' pictures and videos in the message-log channel |
| Manage Threads | Removing threads started in the locked message-log channel |
| Manage Server | Recording what Discord's own AutoMod does (Discord only tells bots that have it), and reading invites to post which invite each person joined with. Both are optional: without it, the rest works |
Slash commands appear within a few seconds of the bot joining.
Put the server in a network
A server only becomes part of a network when its admins choose one and that network's admins agree. Until then it's in no network: nothing is mirrored to or from it, the bot doesn't act there, and its commands answer that the server is waiting. This stops someone who gets hold of the invite link from adding their own server and receiving your bans.
Sign in to the panel with Discord and open Your servers: it lists every server you manage. Under the server:
- Create a network with it, if it's the first server of your community. You own the network, and the server is its main server.
- Ask to join an existing network, with the join code its admins give you (they find it in Settings → Network). They confirm it on the Dashboard, under Network status → Asking to join.
Easier: add it from the panel. On Your servers, click Add bot next to a server and approve on Discord's page (the server is already chosen). If you're an admin of the network you're working in, the server comes back in it. If not, it comes back in no network, ready for the choices above.
See Managing servers and networks for the whole flow, and who counts as a network admin.
3. Move the bot's role up
Discord only lets the bot act on members whose highest role is below the bot's own role. In Server Settings → Roles, drag the bot's role above every role it should be able to moderate (for example, above "Member" but below "Admin").
4. Run /setup
As a server admin (someone with the Administrator permission):
/setup modlog channel:#mod-logpicks the channel where every action is logged. The bot posts a test message to confirm it can write there. Or let the bot make them: on the panel's Your servers, Create log channels for me (under Left to set up) creates a private#mod-log, and a locked#message-logif the message log is on, and chooses them. Settings → Servers has the same, one channel at a time, and the server menu at the top of the page has Create #mod-log and Create #message-log for each server without them.- Optional:
/setup messagelog channel:#message-logpicks a channel for edited and deleted messages (needs themessagelogmodule). The bot keeps copies of messages in that server from then on, and locks the channel: only staff who can see the message log can read it, and only the bot posts there (details). /setup muterolecreates a role called Muted and hides every channel from it. Use/setup muterole role:@SomeRoleto use an existing role instead. Channels created later are hidden from the role automatically. Optional:/setup importbansrecords the bans already in the server's ban list, so they show on the panel and are mirrored (see Bans made before the bot).
By default everything the bot posts goes to the mod-log channel. To send some kinds elsewhere (for example first appearances to #arrivals), or not post them at all, use the panel's Settings → Where things are posted (details).
Do this in each server. Network status on the panel's Dashboard then shows the server green, or red with what's still missing (permissions, the bot's role, the mod-log channel).
5. Who can use which command
Admins (Discord's Administrator permission; the owner always has it) can use every command and change every setting. /setup, /sync, /blockemoji and /apikey are for admins only.
Everyone else can, by default, do what their Discord permissions suggest: Ban Members allows /ban and /softban, Kick Members allows /kick, and Moderate Members allows timeouts, mutes, warnings, notes and editing cases. To choose exactly what each role may do, switch on role permissions in the panel (Settings → Permissions). Permissions has the full list.
See commands.md for what each command does.