Class: Discorb::Integration
- Inherits:
 - 
      DiscordModel
      
        
- Object
 - DiscordModel
 - Discorb::Integration
 
 
- Defined in:
 - lib/discorb/integration.rb
 
Overview
Represents a integration.
Defined Under Namespace
Classes: Account
Instance Attribute Summary collapse
- 
  
    
      #account -> Discorb::Integration::Account 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The account for the integration.
 - 
  
    
      #application -> Discorb::Application 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The application for the integration.
 - 
  
    
      #enable_emoticons -> Boolean 
    
    
      (also: #enable_emoticons?)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Whether the integration is enabled emoticons.
 - 
  
    
      #enabled -> Boolean 
    
    
      (also: #enabled?)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Whether the integration is enabled.
 - 
  
    
      #expire_behavior -> :remove_role, :kick 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The behavior of the integration when it expires.
 - 
  
    
      #expire_grace_period -> Integer 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The grace period of the integration.
 - 
  
    
      #id -> Discorb::Snowflake 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The ID of the integration.
 - 
  
    
      #revoked -> Boolean 
    
    
      (also: #revoked?)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Whether the integration is revoked.
 - 
  
    
      #subscriber_count -> Integer 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The number of subscribers for the integration.
 - 
  
    
      #syncing -> Boolean 
    
    
      (also: #syncing?)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Whether the integration is syncing.
 - 
  
    
      #type -> Symbol 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The type of integration.
 - 
  
    
      #user -> Discorb::User 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The user for the integration.
 
Instance Method Summary collapse
- 
  
    
      #delete!(reason: nil) -> Object 
    
    
      (also: #destroy!)
    
  
  
  
  
  
  
  
  
  
    
Delete the integration.
 - #guild -> Object
 
Methods inherited from DiscordModel
Instance Attribute Details
#account -> Discorb::Integration::Account (readonly)
Returns The account for the integration.
      28 29 30  | 
    
      # File 'lib/discorb/integration.rb', line 28 def account @account end  | 
  
#application -> Discorb::Application (readonly)
Returns The application for the integration.
      35 36 37  | 
    
      # File 'lib/discorb/integration.rb', line 35 def application @application end  | 
  
#enable_emoticons -> Boolean (readonly) Also known as: enable_emoticons?
Returns Whether the integration is enabled emoticons.
      19 20 21  | 
    
      # File 'lib/discorb/integration.rb', line 19 def enable_emoticons @enable_emoticons end  | 
  
#enabled -> Boolean (readonly) Also known as: enabled?
Returns Whether the integration is enabled.
      13 14 15  | 
    
      # File 'lib/discorb/integration.rb', line 13 def enabled @enabled end  | 
  
#expire_behavior -> :remove_role, :kick (readonly)
Returns The behavior of the integration when it expires.
      22 23 24  | 
    
      # File 'lib/discorb/integration.rb', line 22 def expire_behavior @expire_behavior end  | 
  
#expire_grace_period -> Integer (readonly)
Returns The grace period of the integration.
      24 25 26  | 
    
      # File 'lib/discorb/integration.rb', line 24 def expire_grace_period @expire_grace_period end  | 
  
#id -> Discorb::Snowflake (readonly)
Returns The ID of the integration.
      9 10 11  | 
    
      # File 'lib/discorb/integration.rb', line 9 def id @id end  | 
  
#revoked -> Boolean (readonly) Also known as: revoked?
Returns Whether the integration is revoked.
      32 33 34  | 
    
      # File 'lib/discorb/integration.rb', line 32 def revoked @revoked end  | 
  
#subscriber_count -> Integer (readonly)
Returns The number of subscribers for the integration.
      30 31 32  | 
    
      # File 'lib/discorb/integration.rb', line 30 def subscriber_count @subscriber_count end  | 
  
#syncing -> Boolean (readonly) Also known as: syncing?
Returns Whether the integration is syncing.
      16 17 18  | 
    
      # File 'lib/discorb/integration.rb', line 16 def syncing @syncing end  | 
  
#type -> Symbol (readonly)
Returns The type of integration.
      11 12 13  | 
    
      # File 'lib/discorb/integration.rb', line 11 def type @type end  | 
  
#user -> Discorb::User (readonly)
Returns The user for the integration.
      26 27 28  | 
    
      # File 'lib/discorb/integration.rb', line 26 def user @user end  | 
  
Instance Method Details
#delete!(reason: nil) -> Object Also known as: destroy!
Delete the integration.
      64 65 66 67 68  | 
    
      # File 'lib/discorb/integration.rb', line 64 def delete!(reason: nil) Async do @client.http.delete("/guilds/#{@guild}/integrations/#{@id}", reason: reason).wait end end  | 
  
#guild -> Object
      55 56 57  | 
    
      # File 'lib/discorb/integration.rb', line 55 def guild @client.guilds[@guild_id] end  |