From e8e89e60a844ee9342d3b0bcec2b8f2eb73585ad Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Sun, 27 Apr 2025 13:02:53 -0400 Subject: [PATCH] fix: check if attachments is an array --- src/structures/Interaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Interaction.ts b/src/structures/Interaction.ts index a2407a3..05281fa 100644 --- a/src/structures/Interaction.ts +++ b/src/structures/Interaction.ts @@ -196,7 +196,7 @@ export class BaseInteraction< poll: poll ? (poll instanceof PollBuilder ? poll.toJSON() : poll) : undefined, }; - if ('attachments' in body) { + if (Array.isArray(body.attachments)) { payload.attachments = body.attachments?.map((x, i) => ({ id: x.id ?? i.toString(),