Uptime Robot not working with Discord Cloudflare
cloudagon

Apparently Uptime Robot is sending invalid requests so my bot got temporarily banned from discord.com and I cannot run it anymore. Is there any alternative to Uptime Robot that will work with Discord?

You are viewing a single comment. View All
Answered by c4syner [earned 5 cycles]
View Answer
Coder100

your bot cannot be banned unless the code is malicious, not anything to do with requests.

cloudagon

My bot was temporarily banned. I think Discord considers what I did to be API Abuse. @Coder100

Coder100

ohh no, that's a message overflow @xCloudzx

Coder100

basically someone sent a lot of commands and made your bot spam, and reach the quota @xCloudzx

Coder100

not a big deal, just make sure to add cooldown @xCloudzx

cloudagon

@Coder100 How would I do that? I've looked it up and found no answers. Is there any code I can look at?

Coder100

Store it in a dict, something like this:

@xCloudzx

cloudagon

@Coder100 Wouldn't that only allow me to send one message every 10 seconds on the whole bot, not just one server? That's too slow. Is there any way to just get the amount of time I need to wait and do it only when I need to wait?

Coder100

wdym @xCloudzx

Coder100

right now, it will set the cooldown for that user globally, because doing it in just one server will not help with your problem @xCloudzx

Coder100
cloudagon

@Coder100 How do other bots handle this problem though? Because I'm sure not all of them have cooldowns.

Coder100

soft rate-limiting @xCloudzx

Coder100

unfortunately, you will need lower-level access to how the commands are executed to implement that @xCloudzx

Coder100

basically, every time a user sends a message, it will be put into a waiting line (an array), and every 0.5 seconds that array gets executed and cleared. If the bot experiences an API rate limiting, the array gets cleared to prevent spam. @xCloudzx

cloudagon

@Coder100 This looks like a very nice solution, I will definitely try it. Thanks!

cloudagon

@Coder100 I see, but how does that break my bot? I understand not sending the message, but why was I not able to run my bot?