class Discordrb::Integration
Server
integration
Attributes
@return [IntegrationAccount] the integration account information
@return [true, false] whether emoticons are enabled
@return [true, false] whether emoticons are enabled
@return [true, false] whether the integration is enabled
@return [Integer] the grace period before subscribers expire (in days)
@return [String] the integration name
@return [true, false] has this integration been revoked.
@return [Integer, nil] the role that this integration uses for “subscribers”
@return [Server] the server the integration is linked to
@return [Integer, nil] how many subscribers this integration has.
@return [Time] the time the integration was synced at
@return [true, false] whether the integration is syncing
@return [String] the integration type (YouTube, Twitch, etc.)
@return [User] the user the integration is linked to
Public Class Methods
# File lib/discordrb/data/integration.rb, line 96 def initialize(data, bot, server) @bot = bot @name = data['name'] @server = server @id = data['id'].to_i @enabled = data['enabled'] @syncing = data['syncing'] @type = data['type'] @account = IntegrationAccount.new(data['account']) @synced_at = Time.parse(data['synced_at']) @expire_behaviour = %i[remove kick][data['expire_behavior']] @expire_grace_period = data['expire_grace_period'] @user = @bot.ensure_user(data['user']) @role_id = data['role_id']&.to_i @emoticon = data['enable_emoticons'] @subscriber_count = data['subscriber_count']&.to_i @revoked = data['revoked'] @application = IntegrationApplication.new(data['application'], bot) if data['application'] end
Public Instance Methods
The inspect method is overwritten to give more useful output
# File lib/discordrb/data/integration.rb, line 118 def inspect "<Integration name=#{@name} id=#{@id} type=#{@type} enabled=#{@enabled}>" end