WebhookEmbed.cs 665 B

123456789101112131415161718192021222324252627
  1. using System.Text.Json.Serialization;
  2. namespace Content.Server.Discord;
  3. // https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
  4. public struct WebhookEmbed
  5. {
  6. [JsonPropertyName("title")]
  7. public string Title { get; set; } = "";
  8. [JsonPropertyName("description")]
  9. public string Description { get; set; } = "";
  10. [JsonPropertyName("color")]
  11. public int Color { get; set; } = 0;
  12. [JsonPropertyName("footer")]
  13. public WebhookEmbedFooter? Footer { get; set; } = null;
  14. [JsonPropertyName("fields")]
  15. public List<WebhookEmbedField> Fields { get; set; } = default!;
  16. public WebhookEmbed()
  17. {
  18. }
  19. }