mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[core] add support of new bot api
This commit is contained in:
@@ -43,7 +43,7 @@ public class Store : BotEventHandler
|
||||
var user = From;
|
||||
var reputation = await _reputation.GetUserReputationAsync(Chat, user);
|
||||
|
||||
await Bot.SendTextMessageAsync(Chat.Id, $"<b>{user.ToHtml()} ({reputation})</b>, чего пожелаете?", ParseMode.Html,
|
||||
await Bot.SendTextMessageAsync(Chat.Id, $"<b>{user.ToHtml()} ({reputation})</b>, чего пожелаете?", parseMode: ParseMode.Html,
|
||||
replyMarkup: new InlineKeyboardMarkup(
|
||||
_provider.GetServices<IRandomMediaService>()
|
||||
.ToAsyncEnumerable()
|
||||
@@ -116,7 +116,7 @@ public class Store : BotEventHandler
|
||||
switch (randomMedia.Type)
|
||||
{
|
||||
case InputMediaType.Photo:
|
||||
await Bot.SendPhotoAsync(Chat.Id, file, randomMedia.Caption, replyToMessageId: messageId, parseMode: ParseMode.Html);
|
||||
await Bot.SendPhotoAsync(Chat.Id, file, 0, randomMedia.Caption, replyToMessageId: messageId, parseMode: ParseMode.Html);
|
||||
break;
|
||||
case InputMediaType.Video:
|
||||
await Bot.SendVideoAsync(Chat.Id, file, caption: randomMedia.Caption, replyToMessageId: messageId, parseMode: ParseMode.Html);
|
||||
|
||||
Reference in New Issue
Block a user