/// <summary> /// Adds a command to the bot engine /// </summary> /// <param name="command">The command to add</param> /// <returns><c>true</c> if the command was successfully initialized and added, /// otherwise <c>false</c></returns> public bool AddCommand(IBotCommand command) { var success = command.Initialize(this); if (success) { CommandMap[command.Shortcut] = command; } return(success); }
protected void AddCommand(IStorageManager storageManager, IBotCommand command) { command.Storage = storageManager.StorageFor(command.Id); command.Initialize(); _commands.Add(command); }