Skip to content

Commit 0c12079

Browse files
DeclanFramptonMisha-133quinchs
authored
ModifyAsync Attachments Bug Fix #2236 (#2742)
* 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]>
1 parent 5fb9152 commit 0c12079

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@ public static async Task DeleteFollowupMessageAsync(BaseDiscordClient client, Re
480480
}
481481
else
482482
{
483-
var apiArgs = new UploadWebhookFileParams(args.Attachments.Value.ToArray())
483+
var attachments = args.Attachments.Value?.ToArray() ?? Array.Empty<FileAttachment>();
484+
485+
var apiArgs = new UploadWebhookFileParams(attachments)
484486
{
485487
Content = args.Content,
486488
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified,

0 commit comments

Comments
 (0)