Class: Cogs::Cog

Inherits:
Object
  • Object
show all
Defined in:
lib/cogsdrb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fpObject

Returns the value of attribute fp.



13
14
15
# File 'lib/cogsdrb.rb', line 13

def fp
  @fp
end

#nameObject

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

#commandsObject



20
# File 'lib/cogsdrb.rb', line 20

def commands; end