Package org.javacord.api.entity
Interface ApplicationInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanbotRequiresCodeGrant()Check if the application's bot require OAuth2 code grant.longgetClientId()Gets the client id of the application.java.lang.StringgetDescription()Gets the description of the application.java.util.Optional<ApplicationOwner>getOwner()Gets the owner of the Application.default java.util.Optional<java.lang.String>getOwnerDiscriminator()Deprecated.This method is deprecated.default java.util.Optional<java.lang.Long>getOwnerId()Deprecated.This method is deprecated.default java.util.Optional<java.lang.String>getOwnerName()Deprecated.This method is deprecated.java.util.Optional<Team>getTeam()Gets the team owning the application.default booleanisOwnedByTeam()Check if the application is owned by a team rather than a single user.booleanisPublicBot()Check if the application's bot is public.default java.util.concurrent.CompletableFuture<java.util.Optional<User>>requestOwner()Deprecated.This method is deprecated.
-
-
-
Method Detail
-
getClientId
long getClientId()
Gets the client id of the application.- Returns:
- The client id of the application.
-
getDescription
java.lang.String getDescription()
Gets the description of the application.- Returns:
- The description of the application.
-
isPublicBot
boolean isPublicBot()
Check if the application's bot is public.- Returns:
- Whether the application's bot is public or not.
-
isOwnedByTeam
default boolean isOwnedByTeam()
Check if the application is owned by a team rather than a single user.- Returns:
- Whether the application is owned by a team.
-
botRequiresCodeGrant
boolean botRequiresCodeGrant()
Check if the application's bot require OAuth2 code grant.- Returns:
- Whether the application's bot require OAuth2 code grant or not.
-
getOwnerName
@Deprecated default java.util.Optional<java.lang.String> getOwnerName()
Deprecated.This method is deprecated. AccessgetOwner()instead. This method is scheduled for removal.Gets the name of the application owner.If the application is owned by a user, this will be the username. If it is owned by a team, the return value will be empty.
- Returns:
- The name of the application owner, if applicable.
-
getOwnerId
@Deprecated default java.util.Optional<java.lang.Long> getOwnerId()
Deprecated.This method is deprecated. AccessgetOwner()instead. This method is scheduled for removal.Gets the id of the application owner.- Returns:
- The id of the application owner.
-
getOwner
java.util.Optional<ApplicationOwner> getOwner()
Gets the owner of the Application.An application might be owned by a user or team. If it is not owned by a user, this methods return value will be empty.
- Returns:
- The user owning this application, if applicable.
-
getOwnerDiscriminator
@Deprecated default java.util.Optional<java.lang.String> getOwnerDiscriminator()
Deprecated.This method is deprecated. AccessgetOwner()instead. This method is scheduled for removal.Gets the discriminator of the application owner.The contents of this are undefined if the owner is a team, but will likely always be "0000"
- Returns:
- The discriminator of the application owner, if applicable.
-
requestOwner
@Deprecated default java.util.concurrent.CompletableFuture<java.util.Optional<User>> requestOwner()
Deprecated.This method is deprecated. AccessgetOwner()instead. This method is scheduled for removal.Requests the owner of the application.- Returns:
- The owner of the application.
-
getTeam
java.util.Optional<Team> getTeam()
Gets the team owning the application.- Returns:
- The team owning the application, if applicable.
-
-