mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 20:19:35 +01:00
Updated Section Discord (basic) (markdown)
parent
9ee8180b51
commit
f22d9a1586
@ -137,13 +137,11 @@ SyncTopic=false
|
|||||||
|
|
||||||
[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.
|
[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
|
1. On Discord, go to Server Settings, then Webhooks
|
||||||
2. Specify the name and channel, and copy the resulting webhook URL
|
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`
|
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):
|
If matterbridge does not have permissions to modify webhooks, you will need a webhook per channel:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[gateway]]
|
[[gateway]]
|
||||||
@ -159,5 +157,22 @@ channel="testing"
|
|||||||
WebhookURL="https://discordapp.com/api/webhooks/thing1/thing2"
|
WebhookURL="https://discordapp.com/api/webhooks/thing1/thing2"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If matterbridge **does** have permissions to modify webhooks, you can use one webhook for the gateway:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[gateway]]
|
||||||
|
name="testing"
|
||||||
|
enable=true
|
||||||
|
WebhookURL="https://discordapp.com/api/webhooks/thing1/thing2"
|
||||||
|
|
||||||
|
[[gateway.inout]]
|
||||||
|
account="slack.myworkspace"
|
||||||
|
channel="testing"
|
||||||
|
[[gateway.inout]]
|
||||||
|
account="discord.myserver"
|
||||||
|
channel="testing"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## User token
|
## User token
|
||||||
To use a user token instead of a bot, refer to the [settings page](https://github.com/42wim/matterbridge/wiki/Settings#token-)
|
To use a user token instead of a bot, refer to the [settings page](https://github.com/42wim/matterbridge/wiki/Settings#token-)
|
Loading…
Reference in New Issue
Block a user