Class RateLimitedException

  • All Implemented Interfaces:
    java.io.Serializable

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

      Constructors 
      Constructor Description
      RateLimitedException​(java.lang.String route, long retryAfter)  
      RateLimitedException​(net.dv8tion.jda.internal.requests.Route.CompiledRoute route, long retryAfter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getRateLimitedRoute()
      The route responsible for the rate limit bucket that is used in the responsible RateLimiter
      long getRetryAfter()
      The back-off delay in milliseconds that should be respected before trying to query the route again
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RateLimitedException

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

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

      • getRateLimitedRoute

        public java.lang.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