Class RateLimitedException

  • All Implemented Interfaces:
    Serializable

    public class RateLimitedException
    extends Exception
    Indicates that we received a 429: Too Many Requests response
    See Also:
    Serialized Form
    • Constructor Detail

      • RateLimitedException

        public RateLimitedException​(net.dv8tion.jda.internal.requests.Route.CompiledRoute route,
                                    long retryAfter)
      • RateLimitedException

        public RateLimitedException​(String route,
                                    long retryAfter)
    • Method Detail

      • getRateLimitedRoute

        public String getRateLimitedRoute()
        The route responsible for the rate limit bucket that is used in the responsible RateLimiter
        Returns:
        The corresponding route
      • getRetryAfter

        public long getRetryAfter()
        The back-off delay in milliseconds that should be respected before trying to query the route again
        Returns:
        The back-off delay in milliseconds