[Fix] Additional Update/Modify Async Attachment's (#2753)

This commit is contained in:
Declan Messer
2023-08-21 23:27:23 +03:00
committed by GitHub
parent 171f95d49c
commit ae275ab3a7
3 changed files with 9 additions and 3 deletions

View File

@@ -109,7 +109,9 @@ namespace Discord.Webhook
}
else
{
var apiArgs = new UploadWebhookFileParams(args.Attachments.Value.ToArray())
var attachments = args.Attachments.Value?.ToArray() ?? Array.Empty<FileAttachment>();
var apiArgs = new UploadWebhookFileParams(attachments)
{
Content = args.Content.IsSpecified ? args.Content.Value : Optional.Create<string>(),
Embeds =