public BotController(IOptions <Settings> settings, ITelegramService botService, IVkGroupsSearcher groupSearcher) { _settings = settings; _botService = botService; _vkGroupSearcher = groupSearcher; _logger = LogManager.GetCurrentClassLogger(); }
public TelegramMessageRouter(UsersContext db, IVkGroupsSearcher vk) { _db = db; _logger = LogManager.GetCurrentClassLogger(); _messageHandlers = new Dictionary <ChatState, BaseTgMessageHandler> { // { ChatState.Standrard, new AddNewAlarms(_db) }, { ChatState.NewGroupToAdd, new InputGroup(_db, vk) }, { ChatState.NewWordToGroupAdd, new InputKeyword(_db) }, { ChatState.EditExistingGroup, new UpdateKeywords(_db) }, { ChatState.RemoveSettingsStep1, new RemoveSettingsStep2(_db) } }; _commandHandlers = new Dictionary <string, BaseTgMessageHandler> { { TgBotText.AddNewSettings, new AddNewAlarms(_db) }, { TgBotText.EditExistingSettings, new EditExistingSettings(_db, vk) }, { TgBotText.RemoveSubscriptions, new RemoveSettingsStep1(_db, vk) } }; }
public InputGroup(UsersContext db, IVkGroupsSearcher vk) : base(db) { _vk = vk; }
public RemoveSettingsStep1(UsersContext db, IVkGroupsSearcher vk) : base(db) { _vk = vk; }
public EditExistingSettings(UsersContext db, IVkGroupsSearcher vk) : base(db) { _vk = vk; }