mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
21 lines
662 B
C#
21 lines
662 B
C#
|
|
using Kruzya.TelegramBot.CustomChatAddOns.Data.InputFile;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using Telegram.Bot;
|
||
|
|
using Telegram.Bot.Types;
|
||
|
|
|
||
|
|
namespace Kruzya.TelegramBot.CustomChatAddOns.Data.WebhookCommand
|
||
|
|
{
|
||
|
|
public class PhotoReplyMessage : BaseReplyMessage, IWebhookCommand
|
||
|
|
{
|
||
|
|
[JsonProperty("photo")]
|
||
|
|
public ICustomInputFile Photo { get; set; }
|
||
|
|
|
||
|
|
public async Task Execute(ITelegramBotClient botClient, Message message)
|
||
|
|
{
|
||
|
|
await botClient.SendPhotoAsync(message.Chat.Id, Photo.Convert(),
|
||
|
|
caption: Content, parseMode: ParseMode,
|
||
|
|
disableNotification: DisableNotification);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|