diff --git a/index.js b/index.js index f6513aa..947f7c5 100644 --- a/index.js +++ b/index.js @@ -102,11 +102,6 @@ async function run(cookie, games) { log('error', game, `Error undocumented, report to Issues page if this persists`) } - - // send to discord webhook if set and valid url - if (discordWebhook && URL.canParse(discordWebhook)) { - await discordWebhookSend() - } } // custom log function to store messages @@ -185,6 +180,10 @@ for (const index in cookies) { await run(cookies[index], games[index]) } +if (discordWebhook && URL.canParse(discordWebhook)) { + await discordWebhookSend() +} + if (hasErrors) { console.log('') throw new Error('Error(s) occured.')