mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 05:56:09 +00:00
fix: destructuring modal
This commit is contained in:
parent
e63d91f2b2
commit
9f8bec917b
@ -5,7 +5,9 @@ import { BaseShorter } from './base';
|
|||||||
export class InteractionShorter extends BaseShorter {
|
export class InteractionShorter extends BaseShorter {
|
||||||
async reply(id: string, token: string, body: ReplyInteractionBody) {
|
async reply(id: string, token: string, body: ReplyInteractionBody) {
|
||||||
//@ts-expect-error
|
//@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
|
return this.client.proxy
|
||||||
.interactions(id)(token)
|
.interactions(id)(token)
|
||||||
.callback.post({
|
.callback.post({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user