Class: Discordrb::IntegrationApplication
- Inherits:
-
Object
- Object
- Discordrb::IntegrationApplication
- Defined in:
- lib/discordrb/data/integration.rb
Overview
Bot/OAuth2 application for discord integrations
Instance Attribute Summary collapse
-
#bot ⇒ User?
readonly
The bot associated with this application.
-
#description ⇒ String
readonly
The description of the application.
-
#icon ⇒ String?
readonly
The icon hash of the application.
-
#id ⇒ Integer
readonly
The ID of the application.
-
#name ⇒ String
readonly
The name of the application.
-
#summary ⇒ String
readonly
The summary of the application.
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ IntegrationApplication
constructor
A new instance of IntegrationApplication.
Constructor Details
#initialize(data, bot) ⇒ IntegrationApplication
Returns a new instance of IntegrationApplication.
38 39 40 41 42 43 44 45 |
# File 'lib/discordrb/data/integration.rb', line 38 def initialize(data, bot) @id = data['id'].to_i @name = data['name'] @icon = data['icon'] @description = data['description'] @summary = data['summary'] @bot = Discordrb::User.new(data['user'], bot) if data['user'] end |
Instance Attribute Details
#bot ⇒ User? (readonly)
Returns the bot associated with this application.
36 37 38 |
# File 'lib/discordrb/data/integration.rb', line 36 def bot @bot end |
#description ⇒ String (readonly)
Returns the description of the application.
30 31 32 |
# File 'lib/discordrb/data/integration.rb', line 30 def description @description end |
#icon ⇒ String? (readonly)
Returns the icon hash of the application.
27 28 29 |
# File 'lib/discordrb/data/integration.rb', line 27 def icon @icon end |
#id ⇒ Integer (readonly)
Returns the ID of the application.
21 22 23 |
# File 'lib/discordrb/data/integration.rb', line 21 def id @id end |
#name ⇒ String (readonly)
Returns the name of the application.
24 25 26 |
# File 'lib/discordrb/data/integration.rb', line 24 def name @name end |
#summary ⇒ String (readonly)
Returns the summary of the application.
33 34 35 |
# File 'lib/discordrb/data/integration.rb', line 33 def summary @summary end |