/// <summary> /// /// </summary> /// <param name="bot">Reference to bot</param> /// <param name="defaultCommand">If no commands matched, then default command will be executed</param> /// <param name="commands">All possible commands list</param> public InlineQueryHandler( ILogger logger, ITelegramBotClient bot, IPriceStorage storage) : base(bot) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _log = logger.ForContext <TextMessageHandler>(); _storage = storage ?? throw new ArgumentNullException(nameof(storage)); }
/// <summary> /// /// </summary> /// <param name="bot">Reference to bot</param> /// <param name="defaultCommand">If no commands matched, then default command will be executed</param> /// <param name="commands">All possible commands list</param> public DocumentMessageHandler( ILogger logger, ITelegramBotClient bot, IPriceParcer parser, IPriceStorage storage) : base(bot) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _log = logger.ForContext <DocumentMessageHandler>(); _parser = parser ?? throw new ArgumentNullException(nameof(parser)); _storage = storage ?? throw new ArgumentNullException(nameof(storage)); }
/// <summary> /// /// </summary> /// <param name="bot">Reference to bot</param> /// <param name="defaultCommand">If no commands matched, then default command will be executed</param> /// <param name="commands">All possible commands list</param> public TextMessageHandler( ILogger logger, ITelegramBotClient bot, IPriceStorage storage, ICommand defaultCommand, params ICommand[] commands) : base(bot) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _log = logger.ForContext <TextMessageHandler>(); _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _defaultCmd = defaultCommand ?? throw new ArgumentNullException(nameof(defaultCommand)); _commands = commands ?? throw new ArgumentNullException(nameof(commands)); _commandsDic = commands.ToDictionary(c => c.Name); }
public BuildsCommand(ITelegramBotClient bot, IPriceStorage storage) : base(bot) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); }
public Categories2Command(ITelegramBotClient bot, IPriceStorage storage) : base(bot, storage) { }
public Builds2Command(ITelegramBotClient bot, IPriceStorage storage) : base(bot, storage) { }