diff --git a/README.md b/README.md index 3220689..8b13d04 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,14 @@ `.env` file is needed due to docker compose. Even if you are not using docker and docker compose, **.ENV IS NEEDED** the example .env is ``` -webhook_url= -webhook_name=Flipper -webhook_profile_picture_link=https://cdn.discordapp.com/avatars/486155512568741900/164084b936b4461fe9505398f7383a0e.png?size=4096 +WEBHOOK_URL= +<<<<<<< HEAD +WEBHOOK_NAME=Auction_Notifier +WEBHOOK_PROFILE_PICTURE= +======= +WEBHOOK_NAME=Flipper +WEBHOOK_PROFILE_PICTURE=https://cdn.discordapp.com/avatars/486155512568741900/164084b936b4461fe9505398f7383a0e.png?size=4096 +>>>>>>> aad843d (uppercased environment variables) ``` You can also add these as environment variables into your system when running Node or run the app via `node --env-file=.env index.js` diff --git a/index.js b/index.js index a4c135c..e17cc67 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ const bazaarPrice = { }; async function initialize() { - const matches = process.env.webhook_url.match(webhookRegex); + const matches = process.env.WEBHOOK_URL.match(webhookRegex); if (!matches) return console.log(`[Main thread] Couldn't parse Webhook URL`); const webhook = new WebhookClient({ id: matches[1], token: matches[2] }); @@ -70,8 +70,8 @@ async function initialize() { ); await webhook.send({ - username: process.env.webhook_name, - avatarURL: process.env.webhook_profile_picture_link, + username: process.env.WEBHOOK_NAME, + avatarURL: process.env.WEBHOOK_PROFILE_PICTURE, embeds: [embed], }); }