2 using System.Collections;
4 namespace TechBot.Library
6 [Command("help", Help = "!help")]
7 public class HelpCommand : Command
9 private string m_CommandName = null;
15 [CommandParameter("Name", "The command name to show help")]
16 public string CommandName
18 get { return m_CommandName; }
19 set { m_CommandName = value; }
22 public override void ExecuteCommand()
24 if (CommandName == null)
26 Say("I support the following commands:");
28 foreach (CommandBuilder command in TechBot.Commands)
37 CommandBuilder cmdBuilder = TechBot.Commands.Find(CommandName);
39 if (cmdBuilder == null)
41 Say("Command '{0}' is not recognized. Type '!help' to show all available commands", CommandName);
45 Say("Command '{0}' help:", CommandName);