Add round end Discord pings, discord webhook API (#19468)

This commit is contained in:
DrSmugleaf
2023-08-24 14:50:07 -07:00
committed by GitHub
parent 7ecdb937ac
commit 913c80db4a
13 changed files with 390 additions and 72 deletions

View File

@@ -0,0 +1,29 @@
using System.Text.Json.Serialization;
namespace Content.Server.Discord;
// https://discord.com/developers/docs/resources/channel#message-object-message-structure
public struct WebhookPayload
{
/// <summary>
/// The message to send in the webhook. Maximum of 2000 characters.
/// </summary>
[JsonPropertyName("content")]
public string Content { get; set; } = "";
[JsonPropertyName("username")]
public string? Username { get; set; }
[JsonPropertyName("avatar_url")]
public string? AvatarUrl { get; set; } = "";
[JsonPropertyName("embeds")]
public List<WebhookEmbed>? Embeds { get; set; } = null;
[JsonPropertyName("allowed_mentions")]
public WebhookMentions AllowedMentions { get; set; } = new();
public WebhookPayload()
{
}
}