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 [Role, nil] the role that this integration uses for “subscribers”
@return [Server] the server the integration is linked to
@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.rb, line 2840 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 = server.role(data['role_id']) || nil @emoticon = data['enable_emoticons'] end
Public Instance Methods
The inspect method is overwritten to give more useful output
# File lib/discordrb/data.rb, line 2859 def inspect "<Integration name=#{@name} id=#{@id} type=#{@type} enabled=#{@enabled}>" end