The short version
A bot is an application someone created in the Discord Developer Portal. The application gets a bot user, which shows up in your member list like any other account. The developer gets a bot token, which works like the bot’s password. Their code runs on a computer or a hosting service, logs in with that token and then does two things all day: it listens for events, and it calls Discord’s API to act on them.
How a bot hears what happens
Most bots open a connection to the Gateway, a persistent WebSocket that Discord uses to push real-time events: a message was posted, a member joined, a role was created. After connecting, the bot has to send a heartbeat at the interval Discord gives it. Miss the heartbeats and Discord closes the connection, and the bot has to resume.
The bot does not get every event by default. It sends a list of intents when it connects, and Discord only sends the event groups it asked for. Three intents are privileged and have to be switched on in the Developer Portal: server members, presences and message content. Verified bots also need Discord’s approval for them.
Message content is the one people notice. A bot without it receives empty text in messages, except its own messages, DMs with it, messages that mention it and messages a context menu command was used on. That is why most bots moved to slash commands.
How slash commands reach a bot
Slash commands are registered with Discord ahead of time over HTTP. A global command shows up in every server that added the app. A guild command only exists in one server and updates instantly, which is why developers test with them. An app can have up to 100 slash commands globally and 100 per server.
When you run a command, Discord sends the bot an interaction. It arrives one of two ways, and an app picks one:
- as an Interaction Create event over the Gateway connection, or
- as an HTTP request to the app’s Interactions Endpoint URL.
Either way the bot must send its first response within 3 seconds. If it needs longer, it sends a deferred response and finishes later. The interaction token is valid for 15 minutes, so follow-up messages have to land inside that window.
The pieces, and what breaks without them
| Piece | What it does | If it is missing |
|---|---|---|
| Bot token | Logs the bot in | The bot cannot connect at all |
| Running process | Keeps the Gateway connection open | The bot stops answering |
| Intents | Choose which events arrive | The bot never sees joins, messages or presences it needs |
| Registered commands | Put the bot in the / menu | Nothing shows when members type / |
| Server permissions | Let the bot send, manage roles, kick | Commands run but the action fails |
| Role position | Decides which roles it can manage | It cannot give or remove roles above its own |
| Shards (2,500+ servers) | Split servers across connections | Large bots cannot connect |
How to make Discord bots work in your server
If you are adding someone else’s bot rather than writing one, the setup is what decides whether it works.
- Invite it with its own link. The invite asks you to pick a server and shows the permissions the bot wants. You need Manage Server in that server to add it.
- Move its role up. A bot can only edit roles below its highest role, and can only grant permissions it has itself. Drag its role above any role it should hand out.
- Check channel overrides. Discord applies permissions in order: @everyone, then roles, then each channel’s overrides for @everyone, roles and finally single members. A deny on one channel can block a bot that works everywhere else.
- Leave Use Application Commands on. This permission controls whether members can run slash commands at all. Per-command limits live in Server Settings, Integrations.
- Test in one channel first. Run a command, read the reply, then open it up to the rest of the server.
If it still does nothing, go through the checklist in why Discord bots stop working. And if a bot asks you to sign in with Discord rather than inviting it, that is OAuth2, covered in how Discord OAuth works.
Where VaultCord fits
VaultCord runs the hosting part for you. You get your own branded bot: 1 on Free, 3 on Premium and unlimited on Plus, online 24/7 without a server of your own. Its slash commands are /verify-embed, /pull, /info, /backup, /massrole, /unrole. It handles verification, server backups and member restore, and the homepage explains how the restore side works step by step.
Open the VaultCord dashboard to create a bot on the Free plan.