Class ApplicationInfo

    • Constructor Detail

      • ApplicationInfo

        public ApplicationInfo​(GatewayDiscordClient gateway,
                               discord4j.discordjson.json.ApplicationInfoData data)
        Constructs a ApplicationInfo with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
    • Method Detail

      • getId

        public Snowflake getId()
        Description copied from interface: Entity
        Gets the Snowflake that uniquely identifies this entity.
        Specified by:
        getId in interface Entity
        Returns:
        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.
        Parameters:
        format - The format in which to get the icon.
        Returns:
        A Mono where, upon successful completion, emits the icon of the application. If an error is received, it is emitted through the Mono.
      • 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:
        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

        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()
        Requests to retrieve the owner of the application.
        Returns:
        A Mono where, upon successful completion, emits the owner of the application. If an error is received, it is emitted through the Mono.
      • getOwner

        public Mono<User> getOwner​(EntityRetrievalStrategy retrievalStrategy)
        Requests to retrieve the owner of the application, using the given retrieval strategy.
        Parameters:
        retrievalStrategy - The strategy to use to get the owner.
        Returns:
        A Mono where, upon successful completion, emits the owner of the application. If an error is received, it is emitted through the Mono.
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object