@hamzaeser when I look at that project I’m not seeing any CPU or Memory constraints, which tells me that this is an intermittent issue most likely related to some command or process that your bot is performing. I’d suggest adding some console.log()
statements to your bot’s commands and events to see which one(s) are causing problems. Another option is to disable commands or events one at a time to see which ones cause the issue.
Once you’ve found which commands or events are problematic you can look more closely at the code for that event or command to see why it’s leaking memory or CPU.
These kinds of problems are difficult to troubleshoot and can be very frustrating, but with some patience you should be able to sort it out. If you find the related command/event but aren’t sure what’s making it slow post that information back here and perhaps someone will be able to offer some suggestions.
Good luck!