using Kruzya.TelegramBot.Core.Attributes; using Newtonsoft.Json; using Telegram.Bot.Types; namespace Kruzya.TelegramBot.CustomChatAddOns.Data { [AllowedSerializableType("ping")] public class Ping { [JsonProperty("chat_id")] public long ChatId { get; set; } [JsonProperty("user_id")] public long UserId { get; set; } [JsonProperty("confirmation")] public string Confirmation { get; set; } = Guid.NewGuid().ToString(); public Ping From(Message message) => new() { ChatId = message.Chat.Id, UserId = message.From!.Id }; } }