@@ -13,7 +13,7 @@ After creating an instance of the webhook you're able to configure the following
1313``` php
1414use DiscordWebhook\Webhook;
1515
16- $wh = new Webhook('https://my.webhook/url');
16+ $wh = new Webhook([ 'https://my.webhook/url'] );
1717$wh
1818 ->setUsername('My awesome BOT 💥')
1919 ->setAvatar('https://url.to/the_avatar.jpg');
@@ -24,7 +24,7 @@ It's no rocket sience, just that simple:
2424``` php
2525use DiscordWebhook\Webhook;
2626
27- $wh = new Webhook('https://my.webhook/url');
27+ $wh = new Webhook([ 'https://my.webhook/url'] );
2828$wh
2929 ->setMessage('Test-message')
3030 ->send();
@@ -35,6 +35,23 @@ If you want to send Text-To-Speech (TTS) messages just set the TTS to `true`
3535``` php
3636use DiscordWebhook\Webhook;
3737
38- $wh = new Webhook('https://my.webhook/url');
38+ $wh = new Webhook([ 'https://my.webhook/url'] );
3939$wh->setTts(true);
4040```
41+
42+ ### Multiple destinations
43+ The constructor accepts an array. There you can pass multiple webhooks which are all executed.
44+ This is useful when you want to send the same information to multiple Discord servers.
45+ ``` php
46+ use DiscordWebhook\Webhook;
47+
48+ $wh = new Webhook([
49+ 'https://my.webhook/url',
50+ 'https://another.webhook/url/v2',
51+ '...'
52+ ]);
53+
54+ $wh
55+ ->setMessage('Test-message')
56+ ->send();
57+ ```
0 commit comments