why does this work in dev but not production

client.guilds.cache.get(CONFIG.guildId).channels.cache.get(CONFIG.siteLogChannelId).send('Bot started');
client.guilds.cache.get(CONFIG.guildId).channels.cache.get(CONFIG.siteLogChannelId).send('Bot started');
on my dev environment it works fine. then I deploy it, and it crashes the whole site because .channels is undefined.
3 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oxi
oxi13mo ago
i’m saying it’s most likely you’re config, is it uploaded to your production environment ?
Want results from more Discord servers?
Add your server