[Feature] Add AppliedTags to DiscordWebhookClient.SendXAsync (#2805)

This commit is contained in:
Mihail Gribkov
2023-12-05 01:37:51 +03:00
committed by GitHub
parent b18cc31108
commit 079a98fbdd
4 changed files with 36 additions and 19 deletions

View File

@@ -45,6 +45,9 @@ namespace Discord.API.Rest
[JsonProperty("thread_name")]
public Optional<string> ThreadName { get; set; }
[JsonProperty("applied_tags")]
public Optional<ulong[]> AppliedTags { get; set; }
public IReadOnlyDictionary<string, object> ToDictionary()
{
var d = new Dictionary<string, object>();
@@ -75,6 +78,8 @@ namespace Discord.API.Rest
payload["components"] = Components.Value;
if (ThreadName.IsSpecified)
payload["thread_name"] = ThreadName.Value;
if (AppliedTags.IsSpecified)
payload["applied_tags"] = AppliedTags.Value;
var json = new StringBuilder();
using (var text = new StringWriter(json))