Interface Role.RoleTags

Enclosing interface:
Role

public static interface Role.RoleTags
Tags associated with this role.
Since:
4.2.1
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    The id for the bot associated with this role.
    long
    The id for the bot associated with this role.
    default String
    The id for the integration associated with this role.
    long
    The id for the integration associated with this role.
    default String
    The subscription listing id for this role.
    long
    The subscription listing id for this role.
    default boolean
    Whether this role can be acquired through a premium subscription purchase.
    boolean
    Whether this role has been published for user purchasing.
    boolean
    Whether this role is the boost role of this guild.
    boolean
    Whether this role is associated with a bot.
    boolean
    Whether this role is managed by an integration.
    boolean
    Whether this role is acquired through a user connection.
  • Method Details

    • isBot

      boolean isBot()
      Whether this role is associated with a bot.
      Returns:
      True, if this role is for a bot
    • getBotIdLong

      long getBotIdLong()
      The id for the bot associated with this role.
      Returns:
      The bot id, or 0 if this role is not for a bot
      See Also:
    • getBotId

      @Nullable default String getBotId()
      The id for the bot associated with this role.
      Returns:
      The bot id, or null if this role is not for a bot
      See Also:
    • isBoost

      boolean isBoost()
      Whether this role is the boost role of this guild.
      Returns:
      True, if this role is the boost role
    • isIntegration

      boolean isIntegration()
      Whether this role is managed by an integration.
      This is usually true for roles such as those created for twitch subscribers.
      Returns:
      True, if this role is managed by an integration
    • getIntegrationIdLong

      long getIntegrationIdLong()
      The id for the integration associated with this role.
      Returns:
      The integration id, or 0 if this role is not for an integration
      See Also:
    • getIntegrationId

      @Nullable default String getIntegrationId()
      The id for the integration associated with this role.
      Returns:
      The integration id, or null if this role is not for an integration
      See Also:
    • hasSubscriptionListing

      default boolean hasSubscriptionListing()
      Whether this role can be acquired through a premium subscription purchase. A role would also need isAvailableForPurchase() to also be true for a user to actually be able to purchase the role.
      Returns:
      True, if this is a subscription role
      See Also:
    • getSubscriptionIdLong

      long getSubscriptionIdLong()
      The subscription listing id for this role. If a role has a subscription id then it is a premium role that can be acquired by users via purchase.
      Returns:
      The listing id, or 0 if this role is not for a subscription listing
      See Also:
    • getSubscriptionId

      @Nullable default String getSubscriptionId()
      The subscription listing id for this role. If a role has a subscription id then it is a premium role that can be acquired by users via purchase.
      Returns:
      The listing id, or null if this role is not for a subscription listing
      See Also:
    • isAvailableForPurchase

      boolean isAvailableForPurchase()
      Whether this role has been published for user purchasing. Only premium roles can be purchased. However, a premium role must be published before it can be purchased. Additionally, a premium role can be unpublished after it has been published. Doing so will make it no longer available for purchase but will not remove the role from users who have already purchased it.
      Returns:
      True, if this role is purchasable
      See Also:
    • isLinkedRole

      boolean isLinkedRole()
      Whether this role is acquired through a user connection.
      Such as external services like twitter or reddit. This also includes custom third-party applications, such as those managed by bots via RoleConnectionMetadata.
      Returns:
      True, if this role is acquired through a user connection
      See Also: