ISnowflake
public interface Application extends ISnowflake
JDAClient.getApplications()
,
JDAClient.getApplicationById(String)
Modifier and Type | Interface | Description |
---|---|---|
static interface |
Application.Bot |
Represents a Bot assigned to an Application
To change its Username, login to JDA and use the
AccountManager . |
Modifier and Type | Method | Description |
---|---|---|
RestAction<Application.Bot> |
createBot() |
Creates a new Bot for this Application.
|
RestAction<java.lang.Void> |
delete() |
Deletes this Application and its assigned Bot (if present).
|
boolean |
doesBotRequireCodeGrant() |
Whether the bot requires code grant to invite or not.
|
Application.Bot |
getBot() |
The Bot assigned to this Application
|
java.lang.String |
getDescription() |
The description of the application.
|
int |
getFlags() |
The flags for this application.
|
java.lang.String |
getIconId() |
The icon id of the application.
|
java.lang.String |
getIconUrl() |
The icon-url of the application.
|
JDA |
getJDA() |
The
JDA instance of this Application
(the one owning this application). |
ApplicationManager |
getManager() |
Returns the
ApplicationManager for this Application. |
java.lang.String |
getName() |
The name of this application.
|
java.util.List<java.lang.String> |
getRedirectUris() |
The redirect uris of this application.
|
int |
getRpcApplicationState() |
The rpc application state of this application.
|
java.lang.String |
getSecret() |
Returns the Application secret (Used for oAuth)
|
boolean |
hasBot() |
Returns whether or not this Application has a bot-account assigned
|
boolean |
isBotPublic() |
Whether the bot is public or not.
|
RestAction<Application> |
resetSecret() |
Generates a new client secret for this Application.
|
getCreationTime, getId, getIdLong
@CheckReturnValue RestAction<Application.Bot> createBot()
Warning! This endpoint has a really long ratelimit (multiple hours)!
Possible ErrorResponses
for this
update include the following:
UNKNOWN_APPLICATION
RestAction
- Type: Application.Bot
@CheckReturnValue RestAction<java.lang.Void> delete()
Possible ErrorResponses
for this
update include the following:
UNKNOWN_APPLICATION
RestAction
- Type: Void
boolean doesBotRequireCodeGrant()
This means that additional OAuth2 steps are required to authorize the application to make a bot join a guild
like &response_type=code
together with a valid &redirect_uri
.
For more information look at the Discord OAuth2 documentation.
Application.Bot getBot()
Application.Bot
assigned to this application, or null
if no bot is assignedjava.lang.String getDescription()
String
if no description is definedint getFlags()
java.lang.String getIconId()
null
if no icon is definedjava.lang.String getIconUrl()
null
if no icon is definedJDA getJDA()
JDA
instance of this Application
(the one owning this application).ApplicationManager getManager()
ApplicationManager
for this Application.
RestAction.queue()
.java.lang.String getName()
java.util.List<java.lang.String> getRedirectUris()
List
of current redirect uris of the applicationint getRpcApplicationState()
java.lang.String getSecret()
boolean hasBot()
boolean isBotPublic()
@CheckReturnValue RestAction<Application> resetSecret()
Possible ErrorResponses
for this
update include the following:
UNKNOWN_APPLICATION
RestAction
-
Type: Application