#Bot being rate limited when it starts

34 messages · Page 1 of 1 (latest)

steel atlas
#

My bot gets rate limited for 1 hour when it starts. I've been trying to fix this for 5 hours.

#

anyone knows for to fix this?

hushed onyx
#

can you log out the actual data

green kettleBOT
#

Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.

client
    .on("debug", console.log)
    .on("warn", console.log)

• Note: if you initialize your Client as bot or other identifiers you need to use these instead of client
• If the output is too long to post consider using a bin instead: gist | hasteb.in | sourceb.in | hastebin

steel atlas
#

I can't wait another hour

lament nova
#

Not what he asked for, log the data object

hushed onyx
#

you can hit the ratelimit again within an hour

steel atlas
#

alright

#

I will wait for another hour to get the data object

hushed onyx
#

you can just run it again...

steel atlas
#

okay

hushed onyx
#

it'll hit the ratelimit and give the data

lament nova
#

Wat, you always get the data object when hitting the ratelimit

steel atlas
#

@hushed onyx

hushed onyx
#

you tried to login 1000 times

steel atlas
#

what the hell

#

how

hushed onyx
#

Getting 429 hit on route /gateway/bot when you add client.on('debug', console.log)?
Reasons :
§ You (or someone else) logged in 1000+ times in 24 hours. If you have auto restart on for your code upon crash, you know the culprit.

Are you using shared hosting like Glitch or Repl.it?
§ If yes, your IP has probably been banned by Discord, and theres nothing you can do rly except contact their support, or migrate to a better VPS.

steel atlas
#

I think that the server is automatically restarting the bot on every error

hushed onyx
#

yeah don't do that lol

steel atlas
#

look at that, if every restart gives me money I'll be a billionaire 😂

hushed onyx
#

nothing wrong with pm2 restart but if it crashes every time then you'll incur that ratelimit

steel atlas
#

do you know how to disable pm2 auto restart?

hushed onyx
#

nope, that's a matter of pm2

steel atlas
#

do i have to wait for 24 hours to login again?

hushed onyx
#

don't remember that, sorry

#

i think it's just 12 hours, not sure though

steel atlas
#

is this ban permanent or we'll be able to start the bot again after some hours

hushed onyx
#

ratelimits aren't permanent

steel atlas
#

good

steel atlas
#

@lament nova@hushed onyx Thanks for helping me guys