Bot is offline, while my other one is online
I have 2 bots running on different EC2 instances using pm2. They have the same code base, just some different env stuff and questions I use in them. One appears online while the other is offline. They both have the same settings in the dev portal and everything, so it's quite confusing. I'm sure I missed something, but I don't know what.

4 Replies
- 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![email protected] with node v21.6.2.
Bot of my bots are identical, except ofcourse the things I require to make them work for their specific trivia genre and the few .env changes for them to work as seperate bots. Ever since I launched the "Blitzcrank's Trivia" it has been offline and things like client.user.setPresence({status: 'online'... have not fixed it
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
If you aren't getting any errors, try to place console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn more
same thing as on my other bot
i must also clarify, my bot is DMs only. could that be causing it?
the workaround i found is enabling guild installs, inviting it to a private server, then disabling the guild installs. seems to work just for people who share that server tho
I wanted the bot to look like a normal discord bot, appearing online so I could display custom status messages for when the game would refresh. I was hoping there would be a way to make it "friend" the user by authenticating it via webhooks, but that seems to not be the case. I was not aware of how the DM bot system works, so thanks for the info