public static void SendTextMessage( this ITelegramBotClient telegramBotClient, long chatId, string message, ParseMode parseMode = ParseMode.Default) { try { telegramBotClient.SendTextMessageAsync(chatId, message, parseMode) .ConfigureAwait(false) .GetAwaiter() .GetResult(); } catch (ApiRequestException ex) { Console.WriteLine(ex); telegramBotClient.SendSorryMessage(chatId); } }