diff --git a/README.md b/README.md index 46ce18d..3ab07b6 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ npm install -g dotenv-cli ``` DISCORD_CHANNEL_WEBHOOK_URL=YOUR_WEBHOOK_URL_HERE GITHUB_ACCESS_TOKEN=(ask Matthew for this) +DISCORD_ALERTS_WEBHOOK_URL=YOUR_ALERTS_CHANNEL_WEBHOOK_URL_HERE ``` 7. Start the job: diff --git a/src/discord/index.ts b/src/discord/index.ts index e179df7..3690918 100644 --- a/src/discord/index.ts +++ b/src/discord/index.ts @@ -38,8 +38,8 @@ export const sendDiscordItemMessage = async ( }); return Ok(response.data); } catch (error) { - const alertWebhook = - "https://discord.com/api/webhooks/1255153467937390703/5v_7sPhvtFT3mtNPgogL1jcl56z6n2KHyjT1rCNf6wZ4vPFCAvrtr65fFVY562m48Znn"; + const alertWebhook = process.env.DISCORD_ALERTS_WEBHOOK_URL ?? ""; + await axios.post(alertWebhook, { // @ts-ignore content: `Failed to send Discord message: ${error.message}`,