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>, RestAction.FailedRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor and Description |
---|
ApplicationAction(net.dv8tion.jda.core.entities.impl.JDAImpl api,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
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 . |
complete, complete, completeAfter, getJDA, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter
public ApplicationAction(net.dv8tion.jda.core.entities.impl.JDAImpl api, java.lang.String name)
public 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 Application
java.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 Application
public 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 Application
java.lang.IllegalArgumentException
- If the provided name is null
, less than 2 or more than 32 characters long