[Fix] Additional Update/Modify Async Attachment's (#2753)
This commit is contained in:
@@ -99,7 +99,9 @@ namespace Discord.Rest
|
|||||||
}
|
}
|
||||||
else
|
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,
|
Content = args.Content,
|
||||||
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified,
|
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified,
|
||||||
|
|||||||
@@ -286,7 +286,9 @@ namespace Discord.WebSocket
|
|||||||
}
|
}
|
||||||
else
|
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,
|
Type = InteractionResponseType.UpdateMessage,
|
||||||
Content = args.Content,
|
Content = args.Content,
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ namespace Discord.Webhook
|
|||||||
}
|
}
|
||||||
else
|
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>(),
|
Content = args.Content.IsSpecified ? args.Content.Value : Optional.Create<string>(),
|
||||||
Embeds =
|
Embeds =
|
||||||
|
|||||||
Reference in New Issue
Block a user