releases: allow publishing discord announcements to multiple webhooks

This commit is contained in:
Tyler Wilding 2022-11-04 00:14:41 -04:00 committed by refractionpcsx2
parent 06a0dc374f
commit 212b2aea16
1 changed files with 9 additions and 4 deletions

View File

@ -19,7 +19,12 @@ const embed = new MessageEmbed()
{ name: 'Included Changes', value: releaseInfo.body, inline: false }
);
const webhookClient = new WebhookClient({ url: process.env.DISCORD_BUILD_WEBHOOK });
await webhookClient.send({
embeds: [embed],
});
// Get all webhooks, simple comma-sep string
const webhookUrls = process.env.DISCORD_BUILD_WEBHOOK.split(",");
for (const url of webhookUrls) {
const webhookClient = new WebhookClient({ url: url });
await webhookClient.send({
embeds: [embed],
});
}