import { ButtonInteraction, GuildMember, Message } from "discord.js"; import { PrismaClient } from "@prisma/client"; import { BaseEntry, BaseGuildCache, CommandPayload, ResponseBuilder } from "../"; export default abstract class BaseButton

> { /** * If the button interaction should be deferred * * @example true */ abstract defer: boolean; /** * If the button interaction should be ephemeral * * @example true */ abstract ephemeral: boolean; /** * Middleware to run before the {@link execute} method is called */ abstract middleware: ButtonMiddleware[]; /** * The method that is called when a button interaction is triggered * * @param helper The ButtonHelper containing information about the button interaction */ abstract execute(helper: ButtonHelper): Promise; } export type iButtonMiddleware

, BM extends ButtonMiddleware> = new () => BM; export declare abstract class ButtonMiddleware

> { /** * The function that should handle the button interaction * * @param helper The ButtonHelper containing information about the button interaction * @returns If the next middleware / execute method should be called */ abstract handler(helper: ButtonHelper): boolean | Promise; } export declare class ButtonHelper

> { readonly cache: GC; readonly interaction: ButtonInteraction; constructor(cache: GC, interaction: ButtonInteraction); /** * The GuildMember that pressednt the button */ get member(): GuildMember; /** * The Message containing this button */ get message(): Message; /** * Respond to the user with the `followUp` method on the {@link interaction} * * @param options The data to send back to the user */ respond(options: ResponseBuilder | CommandPayload): void; /** * Update the response to the user with the `update` method on the {@link interaction} * * @param options The data to send back to the user */ update(options: ResponseBuilder | CommandPayload): void; }