From 9f8bec917b80089f073c53c4921e162640071ba7 Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:56:13 -0400 Subject: [PATCH] fix: destructuring modal --- src/common/shorters/interaction.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/shorters/interaction.ts b/src/common/shorters/interaction.ts index 5d7057e..fab188f 100644 --- a/src/common/shorters/interaction.ts +++ b/src/common/shorters/interaction.ts @@ -5,7 +5,9 @@ import { BaseShorter } from './base'; export class InteractionShorter extends BaseShorter { async reply(id: string, token: string, body: ReplyInteractionBody) { //@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.client.proxy .interactions(id)(token) .callback.post({