Class: Help

Inherits:
Rubot::Core::Command show all
Defined in:
lib/template/commands/help.rb

Instance Method Summary collapse

Methods inherited from Rubot::Core::Command

#initialize, #protected?, #run

Constructor Details

This class inherits a constructor from Rubot::Core::Command

Instance Method Details

#execute(server, message, options) ⇒ Object



2
3
4
5
6
7
# File 'lib/template/commands/help.rb', line 2

def execute(server, message, options)
  reply = @dispatcher.commands.keys.collect do |command|
    @dispatcher.function_character + command.to_s
  end.sort.join(", ")
  server.msg(message.destination, reply)
end