public class ApplicationAction extends RestAction<Application>
RestAction specifically
designed to create a Application.
This extension allows setting properties before executing the action.RestAction.EmptyRestAction<T>DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG| Constructor | Description |
|---|---|
ApplicationAction(net.dv8tion.jda.core.entities.impl.JDAImpl api,
java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
ApplicationAction |
setCheck(java.util.function.BooleanSupplier checks) |
Sets the last-second checks before finally executing the http request in the queue.
|
ApplicationAction |
setDescription(java.lang.String description) |
Sets the description for the new
Application. |
ApplicationAction |
setIcon(Icon icon) |
Sets the
Icon of the selected Application. |
ApplicationAction |
setName(java.lang.String name) |
Sets the name for the new
Application. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomplete, complete, completeAfter, getJDA, isPassContext, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfterpublic ApplicationAction(net.dv8tion.jda.core.entities.impl.JDAImpl api,
java.lang.String name)
public ApplicationAction setCheck(java.util.function.BooleanSupplier checks)
RestActionfalse or throws an exception this will not be finished.
When an exception is thrown from the supplier it will be provided to the failure callback.setCheck in class RestAction<Application>checks - The checks to run before executing the request, or null to run no checkspublic ApplicationAction setDescription(java.lang.String description)
Application.
Passing null or an empty String will reset the description.
A description must not be than 400 characters long!
description - The description for new Applicationjava.lang.IllegalArgumentException - If the provided description is more than 400 characters longpublic ApplicationAction setIcon(Icon icon)
Icon of the selected Application.icon - The Icon for new Applicationpublic ApplicationAction setName(java.lang.String name)
Application.
A name must not be null nor less than 2 characters or more than 32 characters long!
name - The name for new Applicationjava.lang.IllegalArgumentException - If the provided name is null, less than 2 or more than 32 characters long