Files
telegram-bot/modules/CombotAntiSpam/Combot/CombotApiResponse.cs
T

31 lines
837 B
C#
Raw Normal View History

2020-03-01 22:46:37 +04:00
using System;
using Newtonsoft.Json;
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
{
internal class CombotApiResponse
{
public class ApiResult
{
[JsonProperty("messages")]
public string[] Messages { get; set; }
[JsonProperty("time_added")]
public int TimeAdded { get; set; }
[JsonProperty("offenses")]
public int Offenses { get; set; }
public DateTime AddedAt => DateTimeOffset.FromUnixTimeSeconds(TimeAdded).DateTime;
}
[JsonProperty("ok")]
public bool IsSpammer { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("result")]
public ApiResult Result { get; set; }
}
}