public IPrepearedBotBuilder RegisterCommand <TCommand, TCondition>() where TCommand : IBotCommand where TCondition : ICommandCondition, new() { var commandInfo = CreateCommandInfo <TCommand>(); var condition = CreateCommandCondition <TCondition>(); RegisterCommand(condition, commandInfo); _logger.Info($"Command {commandInfo} registered."); return(this); }
public BotBuilder(IUnityContainer container) { _logger = ResolveLogger(container); _bot = container.Resolve <Bot>(); _bot.Logger = _logger; _logger.Info("Bot resolved"); }