mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[quote] Crappy chat quote implementation.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#nullable disable
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace West.TelegramBot.ChatQuotes.Model;
|
||||
|
||||
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
|
||||
public class QuoteResponse
|
||||
{
|
||||
public bool Ok { get; set; }
|
||||
|
||||
public Result Result { get; set; }
|
||||
public static QuoteResponse FromJson(string json)
|
||||
=> JsonConvert.DeserializeObject<QuoteResponse>(json, ChatQuotes.SerializerSettings);
|
||||
}
|
||||
|
||||
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
|
||||
public class Result
|
||||
{
|
||||
public string Image { get; set; }
|
||||
|
||||
public QuoteType Type { get; set; }
|
||||
|
||||
public long Width { get; set; }
|
||||
|
||||
public long Height { get; set; }
|
||||
}
|
||||
|
||||
public enum QuoteType
|
||||
{
|
||||
Quote = 0,
|
||||
Image,
|
||||
Null
|
||||
}
|
||||
Reference in New Issue
Block a user