Files
Delta-v/Content.Server/Discord/WebhookPayload.cs
T
f4efc57194 Discord AHelp Reply System (#2315)
* Discord Ahelp Reply System (#2283)

* First part of Remote Bwoinking

* This should technically work

* No Actoring

* Fixes Guid not sending over

* Making it work for the final.

* Fixes for api

* Moar Commants!

Just more Comments to mark Frontier changes.

* comment

* wops

* Fixes Naming Rules

* I Should also fix the naming in the actually code...

* Testing some new code

* Naming rule and dependency fix (hopefully)

* Serverside Webhook update on external sent ahelp messages

* Still get data from custom URL's, even if it dosent match a discord webhook

* Apply suggestions from code review (Part 1)

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

* Apply suggestions from code review (Part 2)

* Bwoink system suggsetions

* missing BwoinkSystem changes

* Change access on BwoinkSystem._messageQueues

* Updates the Regex to support other Discord Clients (beta, alpha)

* Merge Fixes

* BwoinkSystem: explicitly match "canary."/"ptb."

---------

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>

* All the configuration

* CVar to use admin OOC color

* Fix description.

* Review changes

* Review changes

* Review changes

---------

Co-authored-by: Myzumi <34660019+Myzumi@users.noreply.github.com>
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>
2025-01-04 00:31:42 +00:00

32 lines
925 B
C#

using System.Text.Json.Serialization;
namespace Content.Server.Discord;
// https://discord.com/developers/docs/resources/channel#message-object-message-structure
public struct WebhookPayload
{
[JsonPropertyName("UserID")] // Frontier, this is used to identify the players in the webhook
public Guid? UserID { get; set; }
/// <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()
{
}
}