Class: Discordrb::Application
- Inherits:
-
Object
- Object
- Discordrb::Application
- Includes:
- IDObject
- Defined in:
- lib/discordrb/data/application.rb
Overview
OAuth Application information
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
The application description.
- #flags ⇒ Integer readonly
-
#name ⇒ String
readonly
The application name.
-
#owner ⇒ User
readonly
Gets the user object of the owner.
-
#rpc_origins ⇒ Array<String>
readonly
The application's origins permitted to use RPC.
Attributes included from IDObject
Instance Method Summary collapse
-
#icon_url ⇒ String?
Utility function to get a application's icon URL.
-
#inspect ⇒ Object
The inspect method is overwritten to give more useful output.
Methods included from IDObject
#==, #creation_time, synthesise
Instance Attribute Details
#description ⇒ String (readonly)
Returns the application description.
12 13 14 |
# File 'lib/discordrb/data/application.rb', line 12 def description @description end |
#flags ⇒ Integer (readonly)
18 19 20 |
# File 'lib/discordrb/data/application.rb', line 18 def flags @flags end |
#name ⇒ String (readonly)
Returns the application name.
9 10 11 |
# File 'lib/discordrb/data/application.rb', line 9 def name @name end |
#owner ⇒ User (readonly)
Gets the user object of the owner. May be limited to username, discriminator, ID, and avatar if the bot cannot reach the owner.
23 24 25 |
# File 'lib/discordrb/data/application.rb', line 23 def owner @owner end |
#rpc_origins ⇒ Array<String> (readonly)
Returns the application's origins permitted to use RPC.
15 16 17 |
# File 'lib/discordrb/data/application.rb', line 15 def rpc_origins @rpc_origins end |
Instance Method Details
#icon_url ⇒ String?
Utility function to get a application's icon URL.
40 41 42 43 44 |
# File 'lib/discordrb/data/application.rb', line 40 def icon_url return nil if @icon_id.nil? API.app_icon_url(@id, @icon_id) end |
#inspect ⇒ Object
The inspect method is overwritten to give more useful output
47 48 49 |
# File 'lib/discordrb/data/application.rb', line 47 def inspect "<Application name=#{@name} id=#{@id}>" end |