My discord bot (powerbots) got banned twice in two days. Remixing the project makes the bot work again but is there a way to prevent this?
Can we get a new Discord Ban Megathread maybe?
My discord bot (powerbots) got banned twice in two days. Remixing the project makes the bot work again but is there a way to prevent this?
Can we get a new Discord Ban Megathread maybe?
This issue is most likely to be a problem on your discord.js code, you might have violated the Terms of Use. I reccomend you to check Discord API TOS
I donât really see whats wrong about it. If you read Discord API TOS basically every bot should violate these? Do you happen to have a clue?
If you allow me into your project, I can check and make sure all your code is following the Discord API Terms.
How? Do I send it to you? I donât wanna give out my token though.
Hey @JasperVandenberghen, welcome to the Glitch forum!
Before we go too far down any particular avenue to troubleshoot, can you let us know what you mean by âbannedâ? If you mean that your bot seems to have ended up on a banned Glitch host twice in the last few days that doesnât necessarily mean thereâs anything wrong with your bot - our hosts sometimes run over 100 individual projects, and any one of those could trigger Discord to ban one of our hosts. If your bot ended up on a banned host a few times in a row thatâs bad luck, but not necessarily anything to do with your project itself.
If instead youâre getting specific information from Discord that your bot in particular is problematic then knowing what youâve been told or what messages or errors youâre seeing could be very helpful.
Thank you!
Well the bot suddenly goes offline. When I ping it with my ping command it does show the ping in my console.log but the bot doesnât react. If I remix the project it always fixes it. After that I googled some and found the discord ban megathread so I figured that was the problem.
Ah ok! Thatâs actually probably not the problem in this case. Whatâs almost certainly happening is that your bot is shutting down about 5 minutes after you close the tab for the Editor.
What you need is something like whatâs discussed in How to make a glitch project to run constantly?. You have the start of it already in your server.js file, but
process.env.PORT
is the best way to make sure your botâs public page can be seen by requests to keep your bot awake. This sample express config is a good place to start.Hope this helps!
oh I changed the port earlier when it was down thinking that was the problem.
I do ping with uptimerobot.com so thats not the problem.
Ok, great - it sounds like weâve got this sorted out now, correct?
I wonât know for sure until it happens again (or doesnât) but will call it a solution for now, yes! Thanks a lot.