class Discordrb::Role::Tags

Wrapper for the role tags

Attributes

available_for_purchase[R]

@return [true, false] Whether this role is available for purchase

bot_id[R]

@return [Integer, nil] The ID of the bot this role belongs to

guild_connections[R]

@return [true, false] Whether this role is a guild’s linked role

integration_id[R]

@return [Integer, nil] The ID of the integration this role belongs to

premium_subscriber[R]

@return [true, false] Whether this is the guild’s Booster role

subscription_listing_id[R]

@return [Integer, nil] The id of this role’s subscription sku and listing

Public Class Methods

new(data) click to toggle source
# File lib/discordrb/data/role.rb, line 61
def initialize(data)
  @bot_id = data['bot_id']&.resolve_id
  @integration_id = data['integration_id']&.resolve_id
  @premium_subscriber = data.key?('premium_subscriber')
  @subscription_listing_id = data['subscription_listing_id']&.resolve_id
  @available_for_purchase = data.key?('available_for_purchase')
  @guild_connections = data.key?('guild_connections')
end