Ask coding questions

← Back to all posts
Discord Bot: How to fix 429 rate limit error?
JeffKamo

I am following a guide I found for creating a Discord Bot, but when I run their example code I hit a 429 error "You are being rate limited" error.

I only ran my bot once and got this error. Why am I being rate limited?

Is this similar to a similar sounding issue I discovered on Glitch's forums where their host server is getting rate limited rather than my specific bot?

Example of the error:

Answered by itchono [earned 5 cycles]
View Answer
Voters
LordRonz
itchono
JeffKamo
Comments
hotnewtop
JeffKamo

I found a fix!

It turns out that you can run kill 1 in the shell tab to destroy the current container and switch to a new one. This fixed it for me.

Props to this thread (in Replit's Discord server) where I found the answer.

itchono

@JeffKamo Thank you! I was having the same problem, and killing the container worked.

scooterb852

@JeffKamo this was a great help for me as well - thank you - the discord thread link is on a server i'm not on so didn't work. could u pls share the server in the post if public so i could join to see the thread?

JeffKamo

@scottburba sorry about that! The link is to Replit's discord. The link to their discord should be in the footer of this site, but just in case:

https://replit.com/discord

scooterb852
ooliver

Very long time ago but why mark your own answer as correct not theirs? @itchono

JeffKamo

@ooliver that was me. I tried setting my comment to the answer, but Replit doesn't seem to let me.

Aardvark7447

@JeffKamo Thank you!

Coder100

Comes from

When your bot sends toom any messages in a period of time, that's called spamming
on the user end, you see this:

on the bot end, you see the error.

Solution

have it not spam smh

JeffKamo

@Coder100 The rate limiting error prevented the bot from ever going live. It is impossible for a bot to spam if it never worked in the first place.

EnderMarkoth

omg...u have discord!! SAMEEEEE

ooliver

Wow a social media? Nobody’s got that @EnderMarkoth