diff --git a/src/structures/Interaction.ts b/src/structures/Interaction.ts index c97340b..03ee770 100644 --- a/src/structures/Interaction.ts +++ b/src/structures/Interaction.ts @@ -239,9 +239,11 @@ export class BaseInteraction< } const result = await this.matchReplied(body, withResponse); // @ts-expect-error - if (body.data instanceof Modal && body.data.__exec) + if (body.data instanceof Modal) { // @ts-expect-error - this.client.components.modals.set(this.user.id, (body.data as Modal).__exec); + if (body.data.__exec) this.client.components.modals.set(this.user.id, (body.data as Modal).__exec); + else if (this.client.components?.modals.has(this.user.id)) this.client.components.modals.delete(this.user.id); + } return result as never; }