import type { ButtonInteraction } from "discord.js"; import type { Context } from "../core/context"; import type { Middleware } from "../types/Middleware"; export interface ButtonOptions { id: string; use?: Middleware[]; execute: (ctx: Context) => Promise; } export class Button { readonly type = "button" as const; readonly id: string; readonly use?: Middleware[]; readonly execute: (ctx: Context) => Promise; constructor(options: ButtonOptions) { this.id = options.id; this.use = options.use; this.execute = options.execute; } }