From 39aba6114470c1eafcb6819207fd421023a2dc98 Mon Sep 17 00:00:00 2001 From: James Nylen Date: Mon, 7 Jan 2019 01:28:18 -0500 Subject: [PATCH] Improve Discord username/avatar spoofing docs --- Section-Discord-(basic).md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Section-Discord-(basic).md b/Section-Discord-(basic).md index cba0108..1a00551 100644 --- a/Section-Discord-(basic).md +++ b/Section-Discord-(basic).md @@ -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" +``` \ No newline at end of file