Discord bot banned again

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? :wink:

Hi @JasperVandenberghen.

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

  1. you need something external to ping your bot or else it won’t start back up after we shut it down every 12 hours
  2. your config in what you do have is using a port that Glitch won’t let the internet see - we only allow certain ports to be accessible - using 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.

1 Like