-
Notifications
You must be signed in to change notification settings - Fork 617
Section Discord (basic)
[discord.mydiscord]
# You can get your token by following the instructions on
# https://github.com/42wim/matterbridge/wiki/Discord-bot-setup
# If you want roles/groups mentions to be shown with names instead of ID,
# you'll need to give your bot the "Manage Roles" permission.
Token="YOUR_TOKEN_HERE"
Server="name or uid of guild" # picked from guilds the bot is connected to
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
Creating a message via a user's API token (the basic configuration above) only lets Matterbridge post with the user/avatar that generated the token. But executing a webhook can set any old username and avatar URL.
Discord webhooks are per-channel. We can implement webhook creation and/or editing but this isn't done yet (see #674). Until then, you'll need to create a webhook for each channel that you want to synchronize:
- On Discord, go to Server Settings, then Webhooks
- Specify the name and channel, and copy the resulting webhook URL
- Paste in your gateway as
WebhookURL="https://discordapp.com/api/webhooks/529689699999999999/Da-H4RRY_P0-kjdsknkfgfjghf
The resulting gateway configuration should look like this (for now, you'll need a gateway for each channel that works this way):
[[gateway]]
name="testing"
enable=true
[[gateway.inout]]
account="slack.myworkspace"
channel="testing"
[[gateway.inout]]
account="discord.myserver"
channel="testing"
[gateway.inout.options]
WebhookURL="https://discordapp.com/api/webhooks/thing1/thing2"
To use a user token instead of a bot, refer to the settings page
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