Improve Discord username/avatar spoofing docs

James Nylen 2019-01-07 01:28:18 -05:00
parent 6f9c8baa40
commit 39aba61144

@ -11,10 +11,26 @@ RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
## Username/avatar spoofing
1. Server settings
2. Webhooks
3. Create Webhook
4. Specify name, channel
5. Copy URL
6. Paste in your gateway as `WebhookURL="https://discordapp.com/api/webhooks/529689699999999999/Da-H4RRY_P0-kjdsknkfgfjghf`
[Creating a message](https://discordapp.com/developers/docs/resources/channel#create-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](https://discordapp.com/developers/docs/resources/webhook#execute-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:
1. On Discord, go to Server Settings, then Webhooks
2. Specify the name and channel, and copy the resulting webhook URL
3. 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"
```