I am trying to host a Discord bot on a Raspberry Pi. I have gotten everything to work and I have a bot running on it. I also made it so the bot restarts on a system reboot. The bot logs in perfectly. However, I tried adding another bot and again, I made it so the bot restarts on system reboot. The bot restarts from what I can see when I use pm2 ls
. However, the bot doesn't go online. I get this error in my logs as well:
HTTPError [FetchError]: request to https://discord.com/api/v9/gateway/bot failed, reason: getaddrinfo EAI_AGAIN discord.com
Also note that I can use pm2 start <process>
and node <file>
to start the bot. Does anybody know why this is happening?