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 , 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 > {
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