I’m making a discord bot with my friend but pretty much every 5-40 minutes the bot goes off but the app is still on. My friend is pinging on uptimerobot and it says it’s down but if it is I don’t know what is causing it, I don’t get any errors when this occurs and ive tried all the things that keep people say keep the app online. The app name is called “pkkfriend”.
It sounds like there’s a problem with how the route that uptimerobot is pinging was setup. It looks like your project is private, but if you DM me a join link I’ll take a look.
Ok, and here is a screenshot of the uptime downtime rate my friend sent me.
You had a duplicate route and two methods of keeping the project alive, so I’ve removed the dupes. Not certain it will help, so let me know if you keep having the issue.
I’m about to go to bed now so il tell my friend to show me the downtime tomorrow and il be sure to let you know about it, thanks!
The bot was down 5 and 6 today for me (BST), and is still off.
Then you need to check your logs for errors from the bot - you now know it’s not a problem with keeping the project awake.
No errors in logs, just install stuff and on messages…
Heres a downtime update for today
I suggest adding additional logging around key bot events so you can start to associate downtime with events and spot the underlying issue.
Assuming you are using
Discord.js lib - use event handlers, something like this (use debug with caution, because it reveals the bot’s token):
... client.on('disconnect', () => console.error('Connection lost...')); client.on('reconnecting', () => console.log('Attempting to reconnect...')); client.on('error', error => console.error(error)); client.on('warn', info => console.error(info)); // client.on('debug', info => console.log(info)); ... client.login(token);
Hm, il be sure to try that when I get back from school. Thanks!
Hm so i noticed theres a error and its a “DiscordAPI: Missing Permissions” error, is there any way that i can check if that error throws and get the server its erroring in and make it leave the server?
(The console is now spamming that error)