import { GuildMember, Message, ModalMessageModalSubmitInteraction } from "discord.js"; import { PrismaClient } from "@prisma/client"; import { BaseEntry, BaseGuildCache, CommandPayload, ResponseBuilder } from "../"; export default abstract class BaseModal
> { /** * If the modal submission should be deferred * * @example true */ abstract defer: boolean; /** * If the modal submission should be ephemeral * * @example true */ abstract ephemeral: boolean; /** * Middleware to run before the {@link execute} method is called */ abstract middleware: ModalMiddleware
[]; /** * The method that is called when a modal is submitted * * @param helper The ModalHelper containing information about the modal submission */ abstract execute(helper: ModalHelper
): Promise > {
/**
* The function that should handle the modal interaction
*
* @param helper The ModalHelper containing information about the modal interaction
* @returns If the next middleware / execute method should be called
*/
abstract handler(helper: ModalHelper ): boolean | Promise > {
readonly cache: GC;
readonly interaction: ModalMessageModalSubmitInteraction;
constructor(cache: GC, interaction: ModalMessageModalSubmitInteraction);
/**
* The GuildMember that submitted the modal
*/
get member(): GuildMember;
/**
* The Message that opened this modal
*/
get message(): Message