Skip to content

Commit

Permalink
ModifyAsync Attachments Bug Fix #2236 (#2742)
Browse files Browse the repository at this point in the history
* ModifyAsync Attatchment Bug Fix

* Resolved UploadWebhookFileParams Bug when passing through null attatchment obj.

* Grammar.

* Update src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs

Co-authored-by: Quin Lynch <[email protected]>

---------

Co-authored-by: Misha133 <[email protected]>
Co-authored-by: Quin Lynch <[email protected]>
  • Loading branch information
3 people authored Aug 10, 2023
1 parent 5fb9152 commit 0c12079
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ public static async Task DeleteFollowupMessageAsync(BaseDiscordClient client, Re
}
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,
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified,
Expand Down

0 comments on commit 0c12079

Please sign in to comment.