Package net.dv8tion.jda.api.exceptions
Class RateLimitedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.dv8tion.jda.api.exceptions.RateLimitedException
-
- All Implemented Interfaces:
Serializable
public class RateLimitedException extends Exception
Indicates that we received a429: Too Many Requestsresponse- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RateLimitedException(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 StringgetRateLimitedRoute()The route responsible for the rate limit bucket that is used in the responsibleRateLimiterlonggetRetryAfter()The back-off delay in milliseconds that should be respected before trying to query therouteagain-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
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 responsibleRateLimiter- Returns:
- The corresponding route
-
getRetryAfter
public long getRetryAfter()
The back-off delay in milliseconds that should be respected before trying to query therouteagain- Returns:
- The back-off delay in milliseconds
-
-