Package discord4j.core.object.entity
Class ApplicationInfo
- java.lang.Object
-
- discord4j.core.object.entity.ApplicationInfo
-
- All Implemented Interfaces:
DiscordObject,Entity
public final class ApplicationInfo extends Object implements Entity
Represents the Current (typically) Application Information.- See Also:
- Application Resource
-
-
Constructor Summary
Constructors Constructor Description ApplicationInfo(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationInfoData data)Constructs aApplicationInfowith an associatedGatewayDiscordClientand Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)GatewayDiscordClientgetClient()Returns theGatewayDiscordClientthat created this object.discord4j.discordjson.json.ApplicationInfoDatagetData()Gets the data of the app.StringgetDescription()Gets the description of the app.Mono<Image>getIcon(Image.Format format)Gets the icon of the application.Optional<String>getIconUrl(Image.Format format)Gets the icon URL of the application, if present.SnowflakegetId()Gets the Snowflake that uniquely identifies this entity.StringgetName()Gets the name of the app.Mono<User>getOwner()Requests to retrieve the owner of the application.Mono<User>getOwner(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the owner of the application, using the given retrieval strategy.SnowflakegetOwnerId()Gets the ID of the owner of the application.Optional<String>getPrivacyPolicyUrl()Gets the url of the app's privacy policy, if present.Optional<ApplicationTeam>getTeam()Gets the members of the application team, if the application belongs to a team.Optional<String>getTermsOfServiceUrl()Gets the url of the app's terms of service, if present.inthashCode()booleanisPublic()Gets whether only the app owner can join the app's bot to guilds.booleanrequireCodeGrant()Gets whether the app's bot will only join upon completion of the full OAuth2 code grant flow.StringtoString()
-
-
-
Constructor Detail
-
ApplicationInfo
public ApplicationInfo(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationInfoData data)
Constructs aApplicationInfowith an associatedGatewayDiscordClientand Discord data.- Parameters:
gateway- TheGatewayDiscordClientassociated to this object, must be non-null.data- The raw data as represented by Discord, must be non-null.
-
-
Method Detail
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObjectReturns theGatewayDiscordClientthat created this object. Methods in it are exclusively based on the entity cache orStorein use. Refer to callinggetClient().rest()to access aDiscordClientthat is capable of requesting entities directly from the REST API.- Specified by:
getClientin interfaceDiscordObject- Returns:
- The
GatewayDiscordClientassociated to this object.
-
getId
public Snowflake getId()
Description copied from interface:EntityGets 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
public String getName()
Gets the name of the app.- Returns:
- The name of the app.
-
getIconUrl
public Optional<String> getIconUrl(Image.Format format)
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
public Mono<Image> getIcon(Image.Format format)
Gets the icon of the application.
-
getDescription
public String 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:
trueif only the app owner can join the app's bot to guilds,falseotherwise.
-
requireCodeGrant
public boolean requireCodeGrant()
Gets whether the app's bot will only join upon completion of the full OAuth2 code grant flow.- Returns:
trueif the app's bot will only join upon completion of the full OAuth2 code grant flow,falseotherwise.
-
getTermsOfServiceUrl
public Optional<String> 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
public Optional<String> getPrivacyPolicyUrl()
Gets the url of the app's privacy policy, if present.- Returns:
- The url of the app's privacy policy, if present.
-
getOwnerId
public Snowflake getOwnerId()
Gets the ID of the owner of the application.- Returns:
- The ID of the owner of the application.
-
getOwner
public Mono<User> getOwner(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the owner of the application, using the given retrieval strategy.
-
getTeam
public Optional<ApplicationTeam> 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.
-
-