Esempio n. 1
0
        public async Task <IActionResult> Index()
        {
            var token = configuration.GetValue <string>("TelegramToken");

            var client   = new Telegram.Bot.TelegramBotClient(token, httpClient);
            var hookInfo = await client.GetWebhookInfoAsync();

            ViewData["hookinfo"]   = JsonConvert.SerializeObject(hookInfo);
            ViewData["lastUpdate"] = JsonConvert.SerializeObject(lastupdate);
            return(View());
        }