Relay custom votes to a webhook (#18561)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
This commit is contained in:
LankLTE
2023-12-14 20:03:32 -08:00
committed by GitHub
parent 53e980abe5
commit 94628d6ab1
10 changed files with 158 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace Content.Server.Discord;
@@ -9,13 +9,13 @@ public struct WebhookPayload
/// The message to send in the webhook. Maximum of 2000 characters.
/// </summary>
[JsonPropertyName("content")]
public string Content { get; set; } = "";
public string? Content { get; set; }
[JsonPropertyName("username")]
public string? Username { get; set; }
[JsonPropertyName("avatar_url")]
public string? AvatarUrl { get; set; } = "";
public string? AvatarUrl { get; set; }
[JsonPropertyName("embeds")]
public List<WebhookEmbed>? Embeds { get; set; } = null;