Esempio n. 1
0
 public static IHostBuilder ConfigureTelegram(this IHostBuilder hostBuilder)
 {
     return(hostBuilder.ConfigureServices((_, collection) =>
     {
         collection.AddSingleton <ITelegramBotClient>(_ => new TelegramBotClient(EnvironmentVars.GetTelegramToken()));
     }));
 }