class QbertBot::Core::Help

Public Instance Methods

help() click to toggle source
# File lib/qbert_bot/core/help.rb, line 6
def help
  [
    ['help', 'Display all commands']
  ]
end
register() click to toggle source
# File lib/qbert_bot/core/help.rb, line 12
def register
  bot.hear(/^help$/) do |msg|
    commands = []
    bot.plugins.each do |plug|
      commands.concat plug.help.map{|i| i.join(' ')}
    end

    msg.reply "Available commands:\n#{commands.join("\n")}"
  end
end