[Fix] Additional Update/Modify Async Attachment's (#2753)
This commit is contained in:
@@ -99,7 +99,9 @@ namespace Discord.Rest
|
||||
}
|
||||
else
|
||||
{
|
||||
var apiArgs = new UploadFileParams(args.Attachments.Value.ToArray())
|
||||
var attachments = args.Attachments.Value?.ToArray() ?? Array.Empty<FileAttachment>();
|
||||
|
||||
var apiArgs = new UploadFileParams(attachments)
|
||||
{
|
||||
Content = args.Content,
|
||||
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified,
|
||||
|
||||
@@ -286,7 +286,9 @@ namespace Discord.WebSocket
|
||||
}
|
||||
else
|
||||
{
|
||||
var response = new API.Rest.UploadInteractionFileParams(args.Attachments.Value.ToArray())
|
||||
var attachments = args.Attachments.Value?.ToArray() ?? Array.Empty<FileAttachment>();
|
||||
|
||||
var response = new API.Rest.UploadInteractionFileParams(attachments)
|
||||
{
|
||||
Type = InteractionResponseType.UpdateMessage,
|
||||
Content = args.Content,
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user