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

30 lines
798 B
C#
Raw Normal View History

2020-03-01 22:46:37 +04:00
using System;
2025-02-09 17:40:03 +02:00
using System.Text.Json.Serialization;
2020-03-01 22:46:37 +04:00
2023-07-28 19:34:28 +03:00
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
internal class CombotApiResponse
2020-03-01 22:46:37 +04:00
{
2023-07-28 19:34:28 +03:00
public class ApiResult
2020-03-01 22:46:37 +04:00
{
2025-02-09 17:40:03 +02:00
[JsonPropertyName("messages")]
2023-07-28 19:34:28 +03:00
public string[] Messages { get; set; }
2020-03-01 22:46:37 +04:00
2025-02-09 17:40:03 +02:00
[JsonPropertyName("time_added")]
2023-07-28 19:34:28 +03:00
public int TimeAdded { get; set; }
2020-03-01 22:46:37 +04:00
2025-02-09 17:40:03 +02:00
[JsonPropertyName("offenses")]
2023-07-28 19:34:28 +03:00
public int Offenses { get; set; }
2020-03-01 22:46:37 +04:00
2023-07-28 19:34:28 +03:00
public DateTime AddedAt => DateTimeOffset.FromUnixTimeSeconds(TimeAdded).DateTime;
}
2020-03-01 22:46:37 +04:00
2025-02-09 17:40:03 +02:00
[JsonPropertyName("ok")]
2023-07-28 19:34:28 +03:00
public bool IsSpammer { get; set; }
2020-03-01 22:46:37 +04:00
2025-02-09 17:40:03 +02:00
[JsonPropertyName("description")]
2023-07-28 19:34:28 +03:00
public string Description { get; set; }
2020-03-01 22:46:37 +04:00
2025-02-09 17:40:03 +02:00
[JsonPropertyName("result")]
2023-07-28 19:34:28 +03:00
public ApiResult Result { get; set; }
2020-03-01 22:46:37 +04:00
}