REST API
The Requester
is used to create HTTPs requests with the Discord API through Routes
.
This automatically handles rate limitations (429) that restrict our request rates. For that it uses an implementation
of RateLimiter
specific for a certain AccountType
.
Learn More
The RestAction
can be found throughout JDA and allows
to specify how the Requester should deal with rate limits.
It has extensions with additional functionalities in net.dv8tion.jda.core.requests.restaction
.
In the case of a failed Request the RestAction will be provided with an ErrorResponseException
which contains a ErrorResponse
representing the failure cause!
WebSocket API
The WebSocketClient
is used to
handle the Event
flow and connection to the Discord gateway.
It can send Presence
updates that will determine how
the Discord Client will display the currently connected account (Online Status / Game)
Interface | Description |
---|---|
RequestFuture<T> |
Future allowing for use of continuations.
|
Class | Description |
---|---|
RestAction<T> |
A class representing a terminal between the user and the discord API.
|
RestAction.EmptyRestAction<T> |
Specialized form of
RestAction that is used to provide information that
has already been retrieved or generated so that another request does not need to be made to Discord. |
RestFuture<T> |
Enum | Description |
---|---|
CloseCode |
Constants representing
WebSocketClient close codes
with association to an explaining message. |
ErrorResponse | |
Method |