# Connect Discord
URL: /docs/rome/discord
Markdown: /docs/rome/discord.md
Description: Talk with Rome in Discord

Use this page to connect Rome to a Discord bot. The bot can receive messages in
servers where it is invited, and your first message to the bot links your
Discord account as Rome's guardian account.

Message the bot yourself right after connecting — the first person to message
it is linked as Rome's guardian.

## Before you start [#before-you-start]

You need:

* Permission to create a Discord application.
* Permission to invite a bot into the Discord server you want to use.
* Access to Rome's web app as the guardian.

## Create the Discord bot [#create-the-discord-bot]

1. Open the [Discord Developer Portal](https://discord.com/developers/applications).
2. Click **New Application** and create an application for Rome.
3. Open the application, then go to **Bot**.
4. If the application does not have a bot yet, click **Add Bot**.
5. On the **Bot** page, click **Reset Token** and copy the bot token. Keep this
   token private.
6. On the same page, scroll to **Privileged Gateway Intents**.
7. Enable **Message Content Intent**.

## Invite the bot to your server [#invite-the-bot-to-your-server]

1. In the same Discord application, go to **OAuth2** then **URL Generator**.
2. Under **Scopes**, select **bot** and **applications.commands**.
3. Under **Bot Permissions**, select **View Channels**, **Send Messages**, and
   **Read Message History**.
4. Copy the generated URL.
5. Open the generated URL in your browser.
6. Choose the server where Rome should be available and approve the invite.

## Check channel permissions [#check-channel-permissions]

After the bot joins the server, make sure it can see and reply in the channel
you want to use:

1. In Discord, open the target channel.
2. Open **Edit Channel** then **Permissions**.
3. Find the Rome bot or the bot's role.
4. Enable **View Channel**, **Send Messages**, and **Read Message History**.
5. Make sure admins who manage Rome commands can use application commands in
   that channel.

If the bot cannot see the channel, Rome cannot receive messages there even if
the bot token is valid.

## Connect in Rome [#connect-in-rome]

1. Open Rome and go to **Settings**.
2. Open **Channel Connections**.
3. Open the **Discord** card.
4. Paste the bot token.
5. Click **Test & Connect**.

Rome validates the token, stores it locally, starts the bot, and registers the
slash commands.

## Link your guardian account [#link-your-guardian-account]

1. In Discord, send a message to the bot.
2. If you are messaging in a server channel, mention the bot in the message.
3. Keep the Rome settings page open. It polls automatically and updates once your
   Discord account is linked as the guardian.

After linking, you can talk to Rome from Discord. In server channels, the bot
responds when it is mentioned or when you reply to one of its messages.