Table of Contents
(based upon https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
Create Bot
First, you need to go here and click "New Application".
Now give your bot a name.
Click "Create". On the next screen, you can optionally set an Avatar Icon for your app and description.
Next, click on Bot on the left-hand menu
hen click "Add Bot"
Click "Yes Do It"
On the Bot screen you will generate your token. Click "Reset Token" and "Yes, Do It!" a second time.
Then you can click "Copy" to put the token it in your clipboard. Keep this for your matterbridge config file.
Here, you can also toggle if the bot is public, which will allow others to invite to their servers. This is off by default and will not do anything unless the matterbridge configuration file lists the servers it has been invited to, so you should just leave this off.
Privileged Gateway Intents
Make sure to also toggle the "Server Members Intent" and "Message Content Intent" options further down under "Privileged Gateway Intents" to allow the bot to see the member list, otherwise you'll get an error message similar to Error obtaining server members: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}
.
Click "Save Changes"
Invite bot
Now it's time to invite your bot to your server. Don't worry about your bot being started for this next step. You can get this under OAuth2 → General
Copy the client ID into this URL and go to it
https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=536870912
The weird number (536870912 = 0x20000000) corresponds to the "Manage Webhooks" permission. If you don't want to use AutoWebhooks=true
, then you can use 0
instead, but you will need to configure the necessary webhooks manually.
It will prompt you to select your server
and then Authorize it
Solve CAPTCHA if necessary
Then you should see
You can confirm the bot is added by looking in your #general channel for "A wild [bot name] appeared!" or "Welcome [bot name]. We hope you brought pizza." or some other pithy welcome message, and checking under Your Guild > Settings > Integrations > Bots and Apps.
Invite to channels
For each channel you want to bridge, you need to make sure the bot user is a member.
The bot should be in all public channels in your server by default, but for private channels you must either make sure to give it an appropriate Role, or to directly add it under Edit Channel > Permissions > Roles/Members
It needs to have View and Send permissions
If you have trouble with this, open an issue and we can improve these docs.
Matterbridge Config
Take the bot's token (the token, not the client ID) and add it to your matterbridge config like so:
[discord.yourbridgeid]
Token="NzY1OTgwMjA2Nzc4Mjg2MTIx.Gpz4tE.HOslqKftF2_bm2y_bIaaACyy3_vLBmbevl02JQ"
# ....
Getting started
How to create your config
Discord bot setup
Slack bot setup
MS Teams setup
Deploy
DigitalOcean
Azure
Docker
Heroku
Gateways
Config: basic
Config: channel rules
Discord
Gitter
Hipchat
IRC
Keybase
Matrix
Mattermost
Microsoft Teams
Mumble
Nextcloud Talk
RocketChat
Slack
Sshchat
Steam
Telegram
Twitch
VK
WhatsApp
XMPP
Zulip
Advanced
Mediaserver setup
Service files
Developer
API
Tengo scripting
Making gateways