Discord

Warning

Discord may ban users who are too suspicious. The bridge shouldn't be too suspicious by default, but if you want to avoid any risk, use a bot account.

To use the bridge, start a chat with @discordbot:dwagon.cc.

Authentication

For more info, see the offical documentation.

QR Login

QR login is more convenient, but requires having the Discord mobile app installed, and may encounter CAPTCHAs which are currently not supported by the bridge.

  1. Send login-qr to start the login.
  2. Log in by scanning the QR code with a Discord mobile app.
    • After scanning the code, you'll need to approve the login on the mobile app. See the official docs for more info.
    • The app can be uninstalled afterwards.
  3. If you encounter a bad request error saying something about a captcha, you'll have to use token login. Otherwise the login should be successful.

Token Login

You can also log in manually and provide the access token to the bridge.

  1. Log in to Discord in a browser. A private window is recommended so you can easily make the browser forget the token without invalidating it.
  2. Press F12 (or ⌘ Cmd+Shift+I on Mac) to open developer tools.
  3. Select the "Network" tab and filter for api.
  4. Press F5 (or ⌘ Cmd+R on Mac) to reload the page.
  5. Pick any successful request (e.g. the library request). Scroll down to "Request Headers" and find the Authorization header. Right-click the entry and choose copy value.
  6. Send login-token user <token> to the bot (replacing <token> with the copied value).
  7. Close the private window

Bot Token Login

If you don't want to use a real account, you can also log in as a bot.

  1. Create an application on Discord's developer site.
  2. In the "Bot" section, add a bot and copy the token.
  3. Enable "server members intent" and "message content intent" under the "Privileged Gateway Intents" section.
  4. Send login-token bot <token>
  5. To add your bot to a guild, go to OAuth2 -> URL Generator, select "bot" under scopes and select 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 !discord set-relay --create command.
    • If you're the guild admin, you can just choose "Administrator" for the bot and not worry about exact permissions.

After logging in, the bridge will create portal rooms for some recent direct messages.

Bridge guilds

If you'd like to bridge guilds, send guilds status to see the list of guilds, then send guilds bridge <id> for each guild that you'd like bridged. Make sure to replace <id> with the guild's ID.

After bridging, spaces will be created automatically, and rooms will be created if necessary when messages are received. You can also pass --entire to the bridge command to immediately create all rooms.

If you want to manually bridge channels, invite the bot to the room you want to bridge, and run !discord bridge <id> to bridge the room. Make sure to replace <id> with the channel's ID.