public class RateLimitException extends RuntimeException
This should always be preemptively thrown by Discord4J's request system. However, if the user somehow hits an actual HTTP 429 from Discord, it will also be reported through this exception.
Constructor and Description |
---|
RateLimitException(String message,
long retryAfter,
String method,
boolean global) |
Modifier and Type | Method and Description |
---|---|
String |
getMethod()
Gets the HTTP method the rate limit was in response to.
|
long |
getRetryDelay()
Gets the amount of time (in milliseconds) to wait until sending another request.
|
boolean |
isGlobal()
Gets whether this is a global rate limit or limited to a particular method.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public long getRetryDelay()
public String getMethod()
public boolean isGlobal()
Copyright © 2018. All rights reserved.