Newsbot.Collector/Newsbot.Collector.Domain/Models/DiscordMessage.cs

65 lines
1.3 KiB
C#

using Newtonsoft.Json;
namespace Newsbot.Collector.Domain.Models;
public class DiscordMessage
{
[JsonProperty("content")]
public string? Content { get; set; }
[JsonProperty("username")]
public string? Username { get; set; }
[JsonProperty("avatar_url")]
public string? AvatarUrl { get; set; }
//[JsonProperty("thread_name")]
//public string ThreadName { get; set; } = "";
[JsonProperty("embeds")]
public DiscordMessageEmbed[]? Embeds { get; set; }
}
public class DiscordMessageEmbedAuthor
{
[JsonProperty("name")]
public string? Name { get; set; }
[JsonProperty("url")]
public string? Url { get; set; }
[JsonProperty("icon_url")]
public string? IconUrl { get; set; }
}
public class DiscordMessageEmbedField
{
[JsonProperty("name")]
public string? Name { get; set; }
[JsonProperty("value")]
public string? Value { get; set; }
[JsonProperty("inline")]
public bool Inline { get; set; }
}
public class DiscordMessageEmbedImage
{
[JsonProperty("url")]
public string? Url { get; set; }
}
public class DiscordMessageEmbedThumbnail
{
[JsonProperty("url")]
public string? Url { get; set; }
}
public class DiscordMessageEmbedFooter
{
[JsonProperty("text")]
public string? Text { get; set; }
[JsonProperty("icon_url")]
public string? IconUrl { get; set; }
}