public virtual Task <ScenarioResult> Init(UserManager userManager, INeighRepository repository, MessageTrail trail) { Users = userManager; Repository = repository; Trail = trail; return(Task.FromResult(ScenarioResult.ContinueCurrent)); }
public override async Task <ScenarioResult> Init(UserManager userManager, INeighRepository repository, MessageTrail trail) { await base.Init(userManager, repository, trail); await PrintMenu(); return(ScenarioResult.ContinueCurrent); }
public override async Task <ScenarioResult> Init(UserManager userManager, INeighRepository repository, MessageTrail trail) { await base.Init(userManager, repository, trail); await PrintMenu("Оставьте сообщение для разработчкиов:"); return(ScenarioResult.ContinueCurrent); }
public BotService(IOptions <WebProxySettings> webProxyOptions, IOptions <BotSettings> botOptions, UserManager userManager, INeighRepository repository) { _webProxySettings = webProxyOptions.Value; _botSettings = botOptions.Value; _userManager = userManager; _repository = repository; if (_webProxySettings.Enabled) { _webProxy = new WebProxy(_webProxySettings.Host, _webProxySettings.Port) { UseDefaultCredentials = true }; _botClient = new TelegramBotClient(_botSettings.Token, _webProxy); } else { _botClient = new TelegramBotClient(_botSettings.Token); } _botClient.OnMessage += OnMessage; _botClient.OnCallbackQuery += OnCallbackQuery; }