Use the new version of TelegramBotFramework

This commit is contained in:
2021-12-22 01:27:56 +04:00
parent 2c158330cc
commit 73ed1d88a9
7 changed files with 19 additions and 19 deletions
+6 -6
View File
@@ -72,11 +72,11 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
var inlineButtons = new InlineKeyboardMarkup(buttons);
if (message == null)
{
await Bot.SendTextMessageAsync(new ChatId(chat.Id), text, ParseMode.Html, true, true, 0, inlineButtons);
await Bot.SendTextMessageAsync(new ChatId(chat.Id), text, ParseMode.Html, null, true, true, 0, replyMarkup: inlineButtons);
}
else
{
await Bot.EditMessageTextAsync(chat, message.MessageId, text, ParseMode.Html, true, inlineButtons);
await Bot.EditMessageTextAsync(chat, message.MessageId, text, ParseMode.Html, null, true, replyMarkup: inlineButtons);
}
}
@@ -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, true);
await Bot.SendTextMessageAsync(Chat, $"No one feed match by search pattern (<code>{query}</code>).", ParseMode.Html, null, true);
}
}
@@ -195,11 +195,11 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
if (editableMessage == null)
{
await Bot.SendTextMessageAsync(Chat, "Select the feed for viewing details", ParseMode.Default,
true, true, 0, new InlineKeyboardMarkup(buttons));
null, true, true, 0, replyMarkup: new InlineKeyboardMarkup(buttons));
}
else
{
await Bot.EditMessageTextAsync(editableMessage.Chat, editableMessage.MessageId, "Select the feed for viewing details", ParseMode.Default, false,
await Bot.EditMessageTextAsync(editableMessage.Chat, editableMessage.MessageId, "Select the feed for viewing details", ParseMode.Default, null, false,
new InlineKeyboardMarkup(buttons));
}
@@ -272,7 +272,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
}
await Bot.SendTextMessageAsync(RawUpdate.CallbackQuery.Message.Chat, messageTextBuilder.ToString(),
ParseMode.Html, true);
ParseMode.Html, null, true);
break;
}
@@ -40,11 +40,11 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Service
try
{
if (string.IsNullOrWhiteSpace(message.ImageUrl))
await _bot.BotClient.SendTextMessageAsync(message.ChatId, message.Text, message.ParseMode,
await _bot.BotClient.SendTextMessageAsync(message.ChatId, message.Text, message.ParseMode, null,
message.DisableWebPagePreview);
else
await _bot.BotClient.SendPhotoAsync(message.ChatId, message.ImageUrl, message.Text,
message.ParseMode, message.DisableWebPagePreview);
message.ParseMode, null, message.DisableWebPagePreview);
}
catch (ApiRequestException e)
{