[core] add support of new bot api

This commit is contained in:
Andriy
2023-01-02 19:01:03 +02:00
parent 19a14bb1ea
commit eca77267d7
23 changed files with 40 additions and 42 deletions
+5 -5
View File
@@ -72,7 +72,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
var inlineButtons = new InlineKeyboardMarkup(buttons);
if (message == null)
{
await Bot.SendTextMessageAsync(new ChatId(chat.Id), text, ParseMode.Html, null, true, true, 0, replyMarkup: inlineButtons);
await Bot.SendTextMessageAsync(new ChatId(chat.Id), text, 0, ParseMode.Html, null, true, true, false, 0, replyMarkup: inlineButtons);
}
else
{
@@ -88,7 +88,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
{
if (!(await GenerateMenu(query)))
{
await Bot.SendTextMessageAsync(Chat, $"No one feed match by search pattern (<code>{query}</code>).", ParseMode.Html, null, true);
await Bot.SendTextMessageAsync(Chat, $"No one feed match by search pattern (<code>{query}</code>).", 0, ParseMode.Html, null, true);
}
}
@@ -192,8 +192,8 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
if (editableMessage == null)
{
await Bot.SendTextMessageAsync(Chat, "Select the feed for viewing details", null,
null, true, true, 0, replyMarkup: new InlineKeyboardMarkup(buttons));
await Bot.SendTextMessageAsync(Chat, "Select the feed for viewing details", 0, null,
null, true, true, false, 0, replyMarkup: new InlineKeyboardMarkup(buttons));
}
else
{
@@ -270,7 +270,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
}
await Bot.SendTextMessageAsync(RawUpdate.CallbackQuery.Message.Chat, messageTextBuilder.ToString(),
ParseMode.Html, null, true);
0, ParseMode.Html, null, true);
break;
}
@@ -31,7 +31,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
textMessage.Append(
$"- exists <b>{subscriptionsCount} subscriptions on feeds</b> (<b>unique subscribers: {uniqueSubscribers}</b>)");
await Bot.SendTextMessageAsync(Chat, textMessage.ToString(), ParseMode.Html);
await Bot.SendTextMessageAsync(Chat, textMessage.ToString(), parseMode: ParseMode.Html);
}
}
}