Class: Cogs::Cog
- Inherits:
-
Object
- Object
- Cogs::Cog
- Defined in:
- lib/cogsdrb.rb
Instance Attribute Summary collapse
-
#fp ⇒ Object
Returns the value of attribute fp.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #command(name, attributes = {}, &block) ⇒ Object
- #commands ⇒ Object
-
#initialize(bot) ⇒ Cog
constructor
A new instance of Cog.
Constructor Details
#initialize(bot) ⇒ Cog
Returns a new instance of Cog.
8 9 10 |
# File 'lib/cogsdrb.rb', line 8 def initialize(bot) @bot = bot end |
Instance Attribute Details
#fp ⇒ Object
Returns the value of attribute fp.
13 14 15 |
# File 'lib/cogsdrb.rb', line 13 def fp @fp end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/cogsdrb.rb', line 12 def name @name end |
Instance Method Details
#command(name, attributes = {}, &block) ⇒ Object
15 16 17 18 |
# File 'lib/cogsdrb.rb', line 15 def command(name, attributes = {}, &block) attributes[:cog] = @name unless attributes[:cog] @bot.command(name, attributes, &block) end |
#commands ⇒ Object
20 |
# File 'lib/cogsdrb.rb', line 20 def commands; end |