fix: destructuring modal

This commit is contained in:
MARCROCK22 2024-04-30 16:56:13 -04:00
parent e63d91f2b2
commit 9f8bec917b

View File

@ -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({