Interface Application.Bot

  • All Superinterfaces:
    ISnowflake
    Enclosing interface:
    Application

    public static interface Application.Bot
    extends ISnowflake
    Represents a Bot assigned to an Application To change its Username, login to JDA and use the AccountManager.
    • Method Detail

      • getApplication

        Application getApplication()
        The Application for this Bot
        Returns:
        The application for this Bot
      • getAvatarId

        java.lang.String getAvatarId()
        The avatar id of this Bot
        Returns:
        The avatar id of this Bot or null, if no avatar is set
      • getAvatarUrl

        java.lang.String getAvatarUrl()
        The avatar-url of this Bot
        Returns:
        The avatar-url of this Bot or null, if no avatar is set
      • getDiscriminator

        java.lang.String getDiscriminator()
        The discriminator of this Bot
        Returns:
        The discriminator of this Bot
      • getInviteUrl

        java.lang.String getInviteUrl​(java.util.Collection<Permission> permissions)
        Creates a OAuth invite-link used to invite the bot.

        The link is provided in the following format:
        https://discordapp.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot&permissions=PERMISSIONS
        Unnecessary query parameters are stripped.

        Parameters:
        permissions - Possibly empty List of Permissions that should be requested via invite.
        Returns:
        The link used to invite the bot
      • getInviteUrl

        java.lang.String getInviteUrl​(Permission... permissions)
        Creates a OAuth invite-link used to invite the bot.

        The link is provided in the following format:
        https://discordapp.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot&permissions=PERMISSIONS
        Unnecessary query parameters are stripped.

        Parameters:
        permissions - Possibly empty array of Permissions that should be requested via invite.
        Returns:
        The link used to invite the bot
      • getInviteUrl

        java.lang.String getInviteUrl​(java.lang.String guildId,
                                      java.util.Collection<Permission> permissions)
        Creates a OAuth invite-link used to invite the bot.

        The link is provided in the following format:
        https://discordapp.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot&permissions=PERMISSIONS&guild_id=GUILD_ID
        Unnecessary query parameters are stripped.

        Parameters:
        guildId - The id of the pre-selected guild.
        permissions - Possibly empty List of Permissions that should be requested via invite.
        Returns:
        The link used to invite the bot
      • getInviteUrl

        java.lang.String getInviteUrl​(java.lang.String guildId,
                                      Permission... permissions)
        Creates a OAuth invite-link used to invite the bot.

        The link is provided in the following format:
        https://discordapp.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot&permissions=PERMISSIONS&guild_id=GUILD_ID
        Unnecessary query parameters are stripped.

        Parameters:
        guildId - The id of the pre-selected guild.
        permissions - Possibly empty array of Permissions that should be requested via invite.
        Returns:
        The link used to invite the bot
      • getName

        java.lang.String getName()
        The name of this Bot
        Returns:
        The name of this Bot
      • getToken

        java.lang.String getToken()
        The token used to login to JDA with this Bot
        This can be used in JDABuilder.setToken(String)
        Returns:
        The authentication token of this Bot