Webhook posting in incorrect guild

My bot is creating it's webhook and posting in my development server instead of production. I've reviewed the environment variables and they match intended values. I've debugged the values and they show correctly except for the webhook information. I'm using Sapphire v4 and DJS 14.7.1. Any help would be greatly appreciated! console output https://pastebin.com/ab7FVRbx package.json https://pastebin.com/zArzGXX4 Webhook class file https://pastebin.com/waiRvDC1
Pastebin
console output - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
package.json - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
src/lib/classes/incoming/webhookManager.ts - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
4 Replies
24
242y ago
Unset the env variable and restart the bot
WhacK
WhacKOP2y ago
tried that but the bot fails without it. Then I set it as the correct value again and it recreated the same issue
24
242y ago
meant via the command line
WhacK
WhacKOP2y ago
Ok I tried that looks like the wrong value being passed in setup I think Ok so the constant file was being run before setup.ts so the env check was coming back undefined. I created a check for that file and it seems to be working. Thank you!
Want results from more Discord servers?
Add your server