From e63d91f2b2d045913dbf4c9cbd30cf90b5bc89b6 Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:59:56 -0400 Subject: [PATCH] fix: destructuring modal --- src/structures/Interaction.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/Interaction.ts b/src/structures/Interaction.ts index bb279a0..157219d 100644 --- a/src/structures/Interaction.ts +++ b/src/structures/Interaction.ts @@ -177,7 +177,9 @@ export class BaseInteraction< private async matchReplied(body: ReplyInteractionBody) { if (this.__reply) { //@ts-expect-error - const { files, ...data } = body.data ?? {}; + const { files, ...rest } = body.data ?? {}; + //@ts-expect-error + const data = body.data instanceof Modal ? body.data : rest; return (this.replied = this.__reply({ body: BaseInteraction.transformBodyRequest({ data, type: body.type }), files: files ? await resolveFiles(files) : undefined,