import { BaseStructure } from './BaseStructure.js'; import { ShewenyError } from '../helpers/index.js'; import type { ShewenyClient } from '../client/Client.js'; import type { ButtonInteraction } from 'discord.js'; import type { Awaitable, ButtonData, CustomId } from '../typescript/index.js'; /** * Represents an Button structure * @extends {BaseStructure} */ export declare abstract class Button extends BaseStructure { /** * Cooldown of a button in seconds * @type {number} */ cooldown: number; /** * Custom id for one or more buttons * @type {CustomId} */ customId: CustomId; /** * Constructor for build a Button * @param {ShewenyClient} [client] Client framework * @param {CustomId} [customId] Custom id for one or more buttons * @param {ButtonData | undefined} [options] The options of the button */ constructor(client: ShewenyClient, customId: CustomId, options?: ButtonData); /** * This function is executed before executing the `execute` function * @param {ButtonInteraction} interaction Button interaction * @returns {any | Promise} */ before?(interaction: ButtonInteraction): Awaitable; /** * Main function `execute` for the buttons * @param {ButtonInteraction} interaction Button interaction * @returns {any | Promise} */ abstract execute(interaction: ButtonInteraction): Awaitable; /** * Register a button in collections * @returns {Collection} */ register(): Promise