public class ApplicationManager
extends net.dv8tion.jda.core.managers.impl.ManagerBase
Application
.
Example
manager.setName("Yui")
.setDescription("Simple but outdated bot")
.queue();
manager.reset(ApplicationManager.NAME | ApplicationManager.PUBLIC)
.setName("BooBot")
.setDescription("Even more outdated bot")
.queue();
Application.getManager()
AuditableRestAction.EmptyRestAction<T>
Modifier and Type | Field | Description |
---|---|---|
static long |
CODE_GRANT |
Used to reset the code grant field
|
static long |
DESCRIPTION |
Used to reset the description field
|
static long |
ICON |
Used to reset the icon field
|
static long |
NAME |
Used to reset the name field
|
static long |
PUBLIC |
Used to reset the public field
|
static long |
REDIRECT_URI |
Used to reset the redirect uri field
|
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor | Description |
---|---|
ApplicationManager(net.dv8tion.jda.client.entities.impl.ApplicationImpl application) |
Modifier and Type | Method | Description |
---|---|---|
Application |
getApplication() |
The
Application that will
be modified by this Manager instance |
ApplicationManager |
reset() |
Resets all fields for this manager.
|
ApplicationManager |
reset(long fields) |
Resets the fields specified by the provided bit-flag pattern.
|
ApplicationManager |
reset(long... fields) |
Resets the fields specified by the provided bit-flag patterns.
|
ApplicationManager |
setDescription(java.lang.String description) |
Sets the description of the selected
Application . |
ApplicationManager |
setDoesBotRequireCodeGrant(boolean requireCodeGrant) |
Sets the code grant state of the selected
Application's bot. |
ApplicationManager |
setIcon(Icon icon) |
Sets the icon of the selected
Application . |
ApplicationManager |
setIsBotPublic(boolean botPublic) |
Sets the public state of the selected
Application's bot. |
ApplicationManager |
setName(java.lang.String name) |
Sets the name of the selected
Application . |
ApplicationManager |
setRedirectUris(java.util.List<java.lang.String> redirectUris) |
Sets the redirect uris of the selected
Application . |
reason, setCheck
complete, isPermissionChecksEnabled, queue, setPermissionChecksEnabled
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
complete, completeAfter, getJDA, isPassContext, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfter
public static final long DESCRIPTION
public static final long ICON
public static final long NAME
public static final long REDIRECT_URI
public static final long PUBLIC
public static final long CODE_GRANT
public ApplicationManager(net.dv8tion.jda.client.entities.impl.ApplicationImpl application)
public Application getApplication()
Application
that will
be modified by this Manager instanceApplication
@CheckReturnValue public ApplicationManager reset(long fields)
manager.reset(ApplicationManager.NAME | ApplicationManager.ROLES);
Flag Constants:
reset
in class net.dv8tion.jda.core.managers.impl.ManagerBase
fields
- Integer value containing the flags to reset.@CheckReturnValue public ApplicationManager reset(long... fields)
manager.reset(ApplicationManager.NAME, ApplicationManager.ICON);
Flag Constants:
reset
in class net.dv8tion.jda.core.managers.impl.ManagerBase
fields
- Integer values containing the flags to reset.@CheckReturnValue public ApplicationManager reset()
@CheckReturnValue public ApplicationManager setDescription(java.lang.String description)
Application
.
A description must not be longer than 400 characters long!
description
- The new description for the selected Application
or null
to resetjava.lang.IllegalArgumentException
- If the provided description is more than 400 characters long@CheckReturnValue public ApplicationManager setDoesBotRequireCodeGrant(boolean requireCodeGrant)
Application's
bot.requireCodeGrant
- The new state for the selected Application's
bot@CheckReturnValue public ApplicationManager setIcon(Icon icon)
Application
.icon
- The new Icon
for the selected Application
or null
to reset@CheckReturnValue public ApplicationManager setIsBotPublic(boolean botPublic)
Application's
bot.botPublic
- The new state for the selected Application's
bot@CheckReturnValue public ApplicationManager 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 new name for the selected Application
java.lang.IllegalArgumentException
- If the provided name is null
, less than 2 or more than 32 characters long@CheckReturnValue public ApplicationManager setRedirectUris(java.util.List<java.lang.String> redirectUris)
Application
.
The redirect uris must not be null
!
redirectUris
- The new redirect uris
for the selected Application
or null
to resetjava.lang.IllegalArgumentException
- If one of the uris is null