static void Main(string[] args) { _ = AppLoader.Instance; AppLoader.LoadConfig(); Console.WriteLine("Config loaded"); _ = new OumanCollector(AppLoader.LoadedConfig); Console.WriteLine("Polling started"); }
public RozalinaBot(IConfiguration config) { _config = config; _botClient = new TelegramBotClient(_config["Telegram:TelegramToken"]); _doorBellUrl = _config["doorBellPictureUrl"]; _oumanCollector = new OumanCollector(_config); _oumanUsers = _config.GetSection("Telegram").GetSection("OumanRegisteredUsers").Get <List <OumanUser> >(); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; InitListeners(); }