Documentation

Custom Bots

AdminUpdated Sep 20, 2026

Custom Bots

Your bot, your brand. Members see your name and avatar — not ours. Understand how custom bots work under the hood, what permissions they need, plan limits, and security.

Overview

Every Restore Hub deployment is powered by a custom bot that you create and own. Unlike shared verification bots where every server shows the same branding, your custom bot displays your chosen name, avatar, and (on Premium+) a custom status in the member list.

This approach gives you full branding control and eliminates the "this bot is in 50,000 servers" trust concern that members often have with shared bots. Your bot is unique to you.

What You Need

To add a custom bot, you need five pieces of information from the Discord Developer Portal (https://discord.com/developers/applications):

  • Client ID — Found on the General Information page. This is the application/bot's unique identifier.

  • Client Secret — Found under OAuth2 → General. Click "Reset Secret" to generate a new one. You can only see it once.

  • Bot Token — Found under Bot → Reset Token. This is the credential that authorizes all API calls.

  • Public Key — Found on General Information. Used to verify interaction payloads from Discord.

  • Redirect URI — The OAuth2 callback URL (e.g., https://restorehub.net/api/callback). Must be added to the OAuth2 Redirects list in the Developer Portal.

Warning: The Client Secret and Bot Token are shown only once when generated. If you lose them, you must reset and generate new ones. Restore Hub encrypts them with AES-256 at rest and never displays them in the dashboard after creation.

How HTTP Interactions Work

Restore Hub uses Discord's Interactions Endpoint instead of the traditional Gateway WebSocket. When you set up a bot, Restore Hub gives you a unique endpoint URL like:

https://restorehub.net/api/interactions/{botId}

HTTP Interactions vs. Gateway — Key Differences

You paste this URL into the Discord Developer Portal under General Information → Interactions Endpoint URL. Discord verifies it with a ping and, once confirmed, routes all slash command invocations and button clicks to this endpoint as HTTP POST requests.

Because there is no Gateway connection, the bot does not maintain a persistent WebSocket. This has several implications:

  • No status dot — The bot appears in the member list without the green/yellow/red circle. This is intentional and looks cleaner.

  • No real-time gateway events from the bot itself — The bot does not receive raw events like MESSAGE_CREATE or GUILD_MEMBER_ADD through its own Gateway. Anti-nuke and anti-raid events are received through a separate system-level Gateway connection.

  • Lower resource usage — No WebSocket heartbeats, no resume/reconnect logic. One HTTP request per interaction.

  • Better scaling — Restore Hub can serve thousands of bots without maintaining thousands of Gateway connections.

  • All REST API operations still work — Role assignment, member kicking, channel creation, backup fetching, and pulling all use Discord's REST API, which does not require a Gateway connection.

Tip: On Premium+ plans, you can configure a custom bot presence (status and activity text like "Playing Verification" or "Watching 5,000 members") even without a Gateway connection. Restore Hub manages this through periodic REST API calls.

Required Discord Permissions

When inviting your bot to a Discord server, the invite link includes an OAuth2 permissions integer. Restore Hub requests the following permissions:

| Permission | Required? | Used For |
|---|---|---|
| Manage Roles | Required | Assigning and removing the verified role (and other roles during pulls with role mapping) |
| Kick Members | Recommended | Anti-nuke/anti-raid response actions, /delunauthed command, security kicks |
| Ban Members | Optional | Anti-nuke response actions, /blacklist enforcement |
| View Channels | Required | Reading channel structure for backups |
| Read Message History | Required | Backing up messages in text channels |
| Manage Channels | Optional | Restoring channels from backups (create/delete channels) |
| Manage Guild | Optional | Restoring server settings from backups |
| Manage Guild Expressions | Optional | Restoring emojis and stickers from backups |
| Send Messages | Optional | Sending log messages to the configured log channel |
| Create Instant Invite | Optional | Generating invite links for alert auto-pull |

Warning: The bot's highest role must be positioned above the verified role in the server's role hierarchy. Discord prevents bots from assigning roles that are higher than their own highest role.

Multiple Bots & Plan Limits

You can create multiple custom bots under a single Restore Hub account. Each bot can be assigned to different servers. This is useful if you run multiple communities with different branding.

| Plan | Max Bots | Max Servers |
|---|---|---|
| Free | 1 | 2 |
| Premium | 5 | 10 |
| Business | 25 | 50 |
| Enterprise | Unlimited | Unlimited |

Tip: A single bot can be used across multiple servers. You do not need a separate bot for each server unless you want different branding per community.

Bot Presence & Activity

On Premium and above, you can configure a custom presence for your bot. This controls the status and activity text that appears in the member list.

| Setting | Options |
|---|---|
| Status | Online, Idle, Do Not Disturb, Invisible |
| Activity Type | Playing, Watching, Listening, Competing |
| Activity Text | Any string (e.g., "restorehub.net" or "Protecting 10K members") |

Bot Token Encryption & Security

All sensitive credentials (bot token, client secret) are encrypted at rest using AES-256 with a master encryption key stored in environment variables, never in the database. When Restore Hub needs to make an API call on behalf of your bot, it decrypts the token in memory, uses it, and discards the plaintext.

Tokens are write-only in the dashboard. After initial setup, you can see the Client ID and redirect URI (which are not sensitive), but the bot token and client secret are never displayed. If you need to update them, you must enter new values.

What Custom Bots Cannot Do

Because Restore Hub uses HTTP interactions instead of the Gateway, there are a few things the bot cannot do on its own:

  • Cannot listen to raw message events — The bot does not see messages as they are sent. Message backups are fetched via the REST API on demand.

  • Cannot show real-time typing indicators or auto-respond to messages — No Gateway means no MESSAGE_CREATE events.

  • Cannot detect voice channel activity — Voice state updates require a Gateway connection.

  • Cannot run continuously in the background — The bot only "wakes up" when a user triggers an interaction or when Restore Hub makes a REST API call.

Tip: These limitations do not affect core functionality. Verification, role assignment, pulling, backups, and all security features work perfectly through the REST API and interactions endpoint.

Slash Commands (Premium+)

On Premium and above, your bot supports slash commands that server administrators can use directly in Discord. Restore Hub registers these commands globally on your bot. Available commands:

| Command | Description |
|---|---|
| /setup | Configure the bot in the current server (set verified role, log channel, etc.) |
| /verify-embed | Post a verification button embed in the current channel |
| /pull | Start a member pull from this server to a target server |
| /backup | Create a manual backup of the current server |
| /restore | Restore a backup to the current server |
| /usercount | Show how many verified and pullable members are in this server |
| /info | Display bot info, uptime, and plan details |
| /blacklist | Blacklist a Discord user from verifying across all your servers |
| /unblacklist | Remove a user from your blacklist |
| /whitelist | Add a whitelist rule to bypass security checks |
| /massrole | Assign a role to all verified members |
| /unrole | Remove a role from all verified members |
| /delunauthed | Kick all members who have not verified |
| /deluser | Remove a specific verified member and revoke their role |
| /stats | Show server verification statistics and funnel data |
| /alerts | Configure nuke/raid/deletion alerts with email and webhook notifications |
| /firewall | Manage firewall rules (add/remove IP, country, ASN, etc.) |
Was this page helpful?