public final class ApplicationInfo extends Object implements Entity
Constructor and Description |
---|
ApplicationInfo(ServiceMediator serviceMediator,
ApplicationInfoBean data)
Constructs a
ApplicationInfo with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
Optional<String> |
getDescription()
Gets the description of the app, if present.
|
Optional<String> |
getIcon(Image.Format format)
Gets the icon URL of the application, if present and in a supported format.
|
Snowflake |
getId()
Gets the Snowflake that uniquely identifies this entity.
|
String |
getName()
Gets the name of the app.
|
Mono<User> |
getOwner()
Requests to retrieve the owner of the application.
|
Snowflake |
getOwnerId()
Gets the ID of the owner of the application.
|
int |
hashCode() |
boolean |
isPublic()
Gets whether only the app owner can join the app's bot to guilds.
|
boolean |
requireCodeGrant()
Gets whether the app's bot will only join upon completion of the full OAuth2 code grant flow.
|
String |
toString() |
public ApplicationInfo(ServiceMediator serviceMediator, ApplicationInfoBean data)
ApplicationInfo
with an associated ServiceMediator and Discord data.serviceMediator
- The ServiceMediator associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.public DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public Snowflake getId()
Entity
public String getName()
public Optional<String> getIcon(Image.Format format)
format
- The format for the URL. Supported format types are PNG
,
JPEG
, and WebP
.public Optional<String> getDescription()
public boolean isPublic()
true
if only the app owner can join the app's bot to guilds, false
otherwise.public boolean requireCodeGrant()
true
if the app's bot will only join upon completion of the full OAuth2 code grant flow,
false
otherwise.public Snowflake getOwnerId()