T
- The generic response type for this RestActionpublic static class AuditableRestAction.EmptyRestAction<T> extends AuditableRestAction<T>
AuditableRestAction
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.
AuditableRestAction.EmptyRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor | Description |
---|---|
EmptyRestAction(JDA api) |
|
EmptyRestAction(JDA api,
T content) |
Modifier and Type | Method | Description |
---|---|---|
void |
queue(java.util.function.Consumer<? super T> success,
java.util.function.Consumer<? super java.lang.Throwable> failure) |
Submits a Request for execution.
|
RequestFuture<T> |
submit(boolean shouldQueue) |
Submits a Request for execution and provides a
RequestFuture
representing its completion task. |
reason, setCheck
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
complete, complete, completeAfter, getJDA, isPassContext, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submitAfter, submitAfter
public EmptyRestAction(JDA api)
public void queue(java.util.function.Consumer<? super T> success, java.util.function.Consumer<? super java.lang.Throwable> failure)
RestAction
This method is asynchronous
queue
in class RestAction<T>
success
- The success callback that will be called at a convenient time
for the API. (can be null)failure
- The failure callback that will be called if the Request
encounters an exception at its execution point.public RequestFuture<T> submit(boolean shouldQueue)
RestAction
RequestFuture
representing its completion task.
Note: The usage of CompletionStage.toCompletableFuture()
is not supported.
submit
in class RestAction<T>
shouldQueue
- Whether the Request should automatically handle rate limitations. (default true)RequestFuture
task representing the completion promise