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