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 <49576606+quinchs@users.noreply.github.com>

---------

Co-authored-by: Misha133 <61027276+Misha-133@users.noreply.github.com>
Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 10, 2023
1 parent 5fb9152 commit 0c12079
Showing 1 changed file with 3 additions and 1 deletion.
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.