# Discord## Features

What the Discord bridge can do

| Direction            | Feature                                                       |
|----------------------|---------------------------------------------------------------|
| Matrix -&gt; Discord | Text, formatted messages, media and file attachments          |
| Matrix -&gt; Discord | Replies and threads                                           |
| Matrix -&gt; Discord | Message redactions                                            |
| Matrix -&gt; Discord | Unicode emoji reactions                                       |
| Matrix -&gt; Discord | Basic bot command execution                                   |
| Matrix -&gt; Discord | Typing notifications and own read status                      |
| Discord -&gt; Matrix | Text, formatted messages, media and file attachments          |
| Discord -&gt; Matrix | Replies, threads, custom emojis, embeds                       |
| Discord -&gt; Matrix | Slash command interactions, @everyone/@here as @room          |
| Discord -&gt; Matrix | Message deletions                                             |
| Discord -&gt; Matrix | Unicode and custom emoji reactions                            |
| Discord -&gt; Matrix | Avatars and read status                                       |
| Discord -&gt; Matrix | Channel and group DM metadata (title, avatar, description)    |
| Misc                 | Login via QR scan or access token                             |
| Misc                 | Automatic portal creation after login and on new DM           |
| Misc                 | Double puppeting for messages sent from other Discord clients |

## Usage

This page explains how to set up the Discord bridge using the Cinny client app (available as an add-on component), so you can send and receive messages between Discord and Matrix rooms.

### Invite the bot to a management room

First, start a chat with `@discordbot:your-server.com` to create a management room. You can do this by inviting the bot to a room, as shown below.

**Make sure to replace `your-server.com` with your actual “base domain”.** Setting `your-server.com` or `example.com` does not work on your server!

![Invitation dialog to create a management room](https://etke.cc/help/bridges/mautrix-discord/images/1.webp)

When the bot joins the room, it will send a confirmation message, as shown below.

![Confirmation message on the room](https://etke.cc/help/bridges/mautrix-discord/images/2.webp)

If you can see the introduction messages, the bot has joined the management room and is working as expected.

### Authentication

The Discord bridge supports two authentication methods: QR code login and bot token login.

⚠️ QR code login is considered a self-bot and is forbidden by Discord. It can result in an account termination. See the [Discord policy](https://support.discord.com/hc/en-us/articles/115002192352-Automated-User-Accounts-Self-Bots).

#### Bot token

To use a bot token for bridging Discord with Matrix, please follow the steps below.

1. Create [an application in Discord Developer Portal](https://discord.com/developers/applications)
2. Add a bot to the “Bot” section of the application, and copy the token
3. Enable `server members intent` and `message content intent` in the “Privileged Gateway Intents” section
4. Send `login-token bot <your token>` to the bridge bot

To add your bot to a guild, go to “OAuth2” -&gt; “URL Generator”, select *only* `bot` under scopes, and choose the permissions to grant. The generated URL can then be used to add the bot to a guild:

- At least `Send Messages`, `Create Public Threads`, `Send Messages in Threads`, `Read Message History` and `Add Reactions` are recommended. `Manage Webhooks` is also useful if you want to use the bridge’s relay mode (`!discord set-relay --create`)
- If you’re the guild admin, you can just choose `Administrator` for the bot and not worry about exact permissions
- **Note**: Do not select any scopes other than `bot`, otherwise you will be required to specify a redirect URI. As long as it is the only scope, a redirect URI is not required.

#### QR code

If you want to proceed with QR code authentication anyway, refer to [this section](https://docs.mau.fi/bridges/go/discord/authentication.html#qr-login) on the bridge’s documentation.

### Useful commands

If you send the message `help` to the room, the available commands are returned in a message like the one below:

![The output returned after sending help](https://etke.cc/help/bridges/mautrix-discord/images/3.webp)

Here are a couple of useful commands:

- `guild status` to see the list of guilds
- `guilds bridge GUILD_ID --entire` to bridge a guild


---
* [llms.txt](https://etke.cc/llms.txt): full site index in markdown
