Exemplo n.º 1
0
 /// <summary>
 /// This method lets you tie into a command that is received from a user. There are no
 /// preset commands. Any new commands are registered with this method. Only one method
 /// can be mapped for one command.
 /// </summary>
 /// <param name="commandName">Command name to register for.</param>
 /// <param name="commandMethod">Method that will be executed when command is encountered.</param>
 /// <param name="help">Help text for command.</param>
 /// <param name="defaultPrivClassName">Name of the default priv class to use for this command.</param>
 protected void RegisterCommand(string commandName, BotCommandEvent commandMethod, CommandHelp help, string defaultPrivClassName)
 {
     Bot.AddCommandListener(commandName, this, commandMethod, help, defaultPrivClassName);
 }
Exemplo n.º 2
0
 /// <summary>
 /// This method lets you tie into a command that is received from a user. There are no
 /// preset commands. Any new commands are registered with this method. Only one method
 /// can be mapped for one command.
 /// </summary>
 /// <param name="commandName">Command name to register for.</param>
 /// <param name="commandMethod">Method that will be executed when command is encountered.</param>
 /// <param name="help">Help text for command.</param>
 /// <param name="privClass">The priv class.</param>
 protected void RegisterCommand(string commandName, BotCommandEvent commandMethod, CommandHelp help, PrivClass privClass)
 {
     RegisterCommand(commandName, commandMethod, help, privClass.Name);
 }