🚧 CAS integration

This commit is contained in:
2020-03-01 22:46:37 +04:00
parent a7b3f97f1a
commit ed255e2506
7 changed files with 162 additions and 0 deletions
@@ -0,0 +1,31 @@
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; }
}
}