Exemplo n.º 1
0
 static void Main(string[] args)
 {
     _ = AppLoader.Instance;
     AppLoader.LoadConfig();
     Console.WriteLine("Config loaded");
     _ = new OumanCollector(AppLoader.LoadedConfig);
     Console.WriteLine("Polling started");
 }
Exemplo n.º 2
0
 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();
 }