Interface ApplicationInfo

  • All Superinterfaces:
    java.util.Formattable, Nameable

    public interface ApplicationInfo
    extends Nameable
    Represents the information of an application (aka. bot). This class won't get updated after being fetched!
    • 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. Access getOwner() 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. Access getOwner() 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. Access getOwner() 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. Access getOwner() 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.