Package discord4j.core.object.entity
Class ApplicationInfo
java.lang.Object
discord4j.core.object.entity.ApplicationInfo
- All Implemented Interfaces:
DiscordObject
,Entity
Represents the Current (typically) Application Information.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Describes the flags of an application. -
Constructor Summary
ConstructorDescriptionApplicationInfo
(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationInfoData data) Constructs aApplicationInfo
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.ApplicationInfoData
getData()
Gets the data of the app.Gets the description of the app.getFlags()
Returns the public flags of thisApplicationInfo
.getIcon
(Image.Format format) Gets the icon of the application.getIconUrl
(Image.Format format) Gets the icon URL of the application, if present.getId()
Gets the Snowflake that uniquely identifies this entity.getName()
Gets the name of the app.getOwner()
Requests to retrieve the owner of the application.getOwner
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the owner of the application, using the given retrieval strategy.Gets the ID of the owner of the application.Gets the url of the app's privacy policy, if present.getTeam()
Gets the members of the application team, if the application belongs to a team.Gets the url of the app's terms of service, if present.int
hashCode()
boolean
isPublic()
Gets whether only the app owner can join the app's bot to guilds.boolean
Gets whether the app's bot will only join upon completion of the full OAuth2 code grant flow.toString()
-
Constructor Details
-
ApplicationInfo
public ApplicationInfo(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationInfoData data) Constructs aApplicationInfo
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Details
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getId
Description copied from interface:Entity
Gets the Snowflake that uniquely identifies this entity. -
getData
public discord4j.discordjson.json.ApplicationInfoData getData()Gets the data of the app.- Returns:
- The data of the app.
-
getName
Gets the name of the app.- Returns:
- The name of the app.
-
getIconUrl
Gets the icon URL of the application, if present.- Parameters:
format
- The format for the URL.- Returns:
- The icon URL of the application, if present.
-
getIcon
Gets the icon of the application. -
getDescription
Gets the description of the app.- Returns:
- The description of the app.
-
isPublic
public boolean isPublic()Gets whether only the app owner can join the app's bot to guilds.- Returns:
true
if only the app owner can join the app's bot to guilds,false
otherwise.
-
requireCodeGrant
public boolean requireCodeGrant()Gets whether the app's bot will only join upon completion of the full OAuth2 code grant flow.- Returns:
true
if the app's bot will only join upon completion of the full OAuth2 code grant flow,false
otherwise.
-
getTermsOfServiceUrl
Gets the url of the app's terms of service, if present.- Returns:
- The url of the app's terms of service, if present.
-
getPrivacyPolicyUrl
Gets the url of the app's privacy policy, if present.- Returns:
- The url of the app's privacy policy, if present.
-
getOwnerId
Gets the ID of the owner of the application.- Returns:
- The ID of the owner of the application.
-
getOwner
Requests to retrieve the owner of the application. -
getOwner
Requests to retrieve the owner of the application, using the given retrieval strategy. -
getTeam
Gets the members of the application team, if the application belongs to a team.- Returns:
- The members of the application's team, if the application belongs to a team.
-
getFlags
Returns the public flags of thisApplicationInfo
.- Returns:
- A
EnumSet
with the public flags of this application.
-
equals
-
hashCode
public int hashCode() -
toString
-