---
title: Discord Bot Setup
description: "EasyAdmin includes an integrated Discord bot that allows server management from Discord. The bot is bundled with EasyAdmin and does not require external hosting. ## Prerequisites - A Discord bot token - A Discord server to add the bot to…"
url: "https://snaily.games/kb/discord-bot-setup/"
updated: "2026-10-12"
category: EasyAdmin / Discord Integration
tags:
  - discord
  - EasyAdmin
---

# Discord Bot Setup

EasyAdmin includes an integrated Discord bot that allows server management from Discord. The bot is bundled with EasyAdmin and does not require external hosting.

## Prerequisites

- A Discord bot token
- A Discord server to add the bot to
- The bot must have **Privileged Gateway Intents** enabled (required for the bot to function)

## Creating the Bot

1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).
2. Click **New Application** and give it a name.
3. Go to the **Bot** tab.
4. Click **Add Bot** if prompted.
5. Under **Privileged Gateway Intents**, enable:
6. **Guild Members Intent**
7. **Message Content Intent**

> Without these intents, the bot will fail to connect with an error about privileged intents.

1. Copy the bot token (click **Reset Token** if you need a new one).

## Inviting the Bot

Generate an invite URL with the required permissions:

| `https://discord.com/oauth2/authorize?scope=applications.commands%20bot&permissions=277562354688&client_id=YOUR_BOT_ID` |
| --- |

Replace `YOUR_BOT_ID` with your bot's Application ID (found in the Discord Developer Portal under **General Information**).

Click the link and select your server to invite the bot.

## Configuring the Bot

Add the bot token to your `server.cfg`:

| `set ea_botToken "your-bot-token-here"` |
| --- |

Restart your server. If the bot connects successfully, you will see a message in the console:

| `[ script:EasyAdmin] Logged in as BotName!` |
| --- |

The bot will appear online in your Discord server.

Upgrading from EasyAdmin 7.x? If your `server.cfg` sets `ea_botGuild`, keep it. EasyAdmin uses it once to remove the old server-specific copy of its commands from that Discord server. A fresh install does not need it — bot commands now work in every server the bot is in.

## Bot Permissions

The bot requires specific Discord channel permissions to function:

- **Send Messages** — For chat bridge and status updates
- **View Channels** — To read messages in the chat bridge channel
- **Manage Messages** — So the bot can delete messages posted in the server status channel
- **Embed Links** — For formatted messages
- **Read Message History** — For chat bridge functionality
- **Use Application Commands** — Required for bot commands

The invite URL above includes the necessary permissions. If you customize the invite, ensure these permissions are granted.
