Interface Application

    • Method Detail

      • createBot

        @CheckReturnValue
        RestAction<Application.Bot> createBot()
        Creates a new Bot for this Application. This cannot be undone! A new Bot will only be created if no bot-account is already assigned, otherwise the existing one is returned. A newly created Bot-account will have its name set to the name of the Application.

        Warning! This endpoint has a really long ratelimit (multiple hours)!

        Possible ErrorResponses for this update include the following:

        Returns:
        RestAction - Type: Application.Bot
        The created bot account of this application.
      • delete

        @CheckReturnValue
        RestAction<java.lang.Void> delete()
        Deletes this Application and its assigned Bot (if present). This cannot be undone!

        Possible ErrorResponses for this update include the following:

        Returns:
        RestAction - Type: Void
        The RestAction to delete this Application.
      • doesBotRequireCodeGrant

        boolean doesBotRequireCodeGrant()
        Whether the bot requires code grant to invite or not.

        This means that additional OAuth2 steps are required to authorize the application to make a bot join a guild like &response_type=code together with a valid &redirect_uri.
        For more information look at the Discord OAuth2 documentation.

        Returns:
        Whether the bot requires code grant
      • getBot

        Application.Bot getBot()
        The Bot assigned to this Application
        Returns:
        The Application.Bot assigned to this application, or null if no bot is assigned
      • getDescription

        java.lang.String getDescription()
        The description of the application.
        Returns:
        The description of the application or an empty String if no description is defined
      • getFlags

        int getFlags()
        The flags for this application. These are used for whitelisted apps.
        Returns:
        The application flags
      • getIconId

        java.lang.String getIconId()
        The icon id of the application.
        The application icon is not necessarily the same as the bot's avatar!
        Returns:
        The iconId of the application or null if no icon is defined
      • getIconUrl

        java.lang.String getIconUrl()
        The icon-url of the application.
        The application icon is not necessarily the same as the bot's avatar!
        Returns:
        The icon-url of the application or null if no icon is defined
      • getJDA

        JDA getJDA()
        The JDA instance of this Application (the one owning this application).
        Returns:
        The JDA instance of this Application
      • getManager

        ApplicationManager getManager()
        Returns the ApplicationManager for this Application.
        In the ApplicationManager, you can modify things like the name and icon of this Application. You modify multiple fields in one request by chaining setters before calling RestAction.queue().
        Returns:
        The ApplicationManager of this Channel
      • getName

        java.lang.String getName()
        The name of this application.
        The application name is not necessarily the same as the bot's name!
        Returns:
        The name of this application
      • getRedirectUris

        java.util.List<java.lang.String> getRedirectUris()
        The redirect uris of this application.
        Returns:
        A List of current redirect uris of the application
      • getRpcApplicationState

        int getRpcApplicationState()
        The rpc application state of this application.
        Returns:
        The rpc application state of current redirect uris of the application
      • getSecret

        java.lang.String getSecret()
        Returns the Application secret (Used for oAuth)
        Returns:
        The Application secret
      • hasBot

        boolean hasBot()
        Returns whether or not this Application has a bot-account assigned
        Returns:
        True, if this Application has a bot-account assigned, false otherwise
      • isBotPublic

        boolean isBotPublic()
        Whether the bot is public or not. Public bots can be added by anyone. When false only the owner can invite the bot to servers.
        Returns:
        Whether the bot is public