class Plugins::BotHelp
Public Instance Methods
execute_help(m, name)
click to toggle source
# File lib/Zeta/plugins/help.rb, line 13 def execute_help(m, name) list = {} @bot.plugins.each { |p| list[p.class.plugin_name.downcase] = {name: p.class.plugin_name, help: p.class.help} }; return m.user.notice("Help for \"#{name}\" could not be found.") unless list.has_key?(name.downcase) m.user.notice("Help for #{Format(:bold, list[name.downcase][:name])}:\n#{list[name.downcase][:help]}") end
execute_list(m)
click to toggle source
# File lib/Zeta/plugins/help.rb, line 21 def execute_list(m) list = [] @bot.plugins.each {|p| list << p.class.plugin_name }; m.user.notice("All #{list.size} currently loaded plugins for #{@bot.nick}:\n#{list.to_sentence}.\nTo view help for a plugin, use `!help <plugin name>`.") end