If you initialize the ratelimiter every time the function is called, it's never going to limit the rate.