import Discord from "discord.js"; import { SlashCommandBuilder } from "@discordjs/builders"; import RainbowBOT from "./RainbowBOT"; import { User } from "."; export declare type ButtonInteractionCallback = (interaction: Discord.ButtonInteraction) => Promise; export declare type CommandInteractionCallback = (interaction: Discord.CommandInteraction, user: User) => Promise; export declare class InteractiveButton extends Discord.MessageButton { readonly uuid: string; private clickCallback?; lastInteraction?: Discord.ButtonInteraction; constructor(uuid: string); onClick(callback: ButtonInteractionCallback): this; destroy(): void; _clicked(interaction: Discord.ButtonInteraction): Promise; } export declare class InteractiveCommand extends SlashCommandBuilder { readonly forGuildId?: string | undefined; isUpdated: boolean; isPushed: boolean; private execCallback?; lastInteraction?: Discord.CommandInteraction; constructor(name: string, forGuildId?: string | undefined); onExecute(callback: CommandInteractionCallback): this; _exec(interaction: Discord.CommandInteraction, user: User): Promise; commit(): this; } export default class InteractionsManager { bot: RainbowBOT; private updateTimer; constructor(bot: RainbowBOT); createCommand(name: string, forGuildId?: string): InteractiveCommand; getCommand(name: string): InteractiveCommand | undefined; createButton(): InteractiveButton; removeButton(btn: InteractiveButton): void; getButton(uuid: string): InteractiveButton | undefined; updateSlashCommands(): Promise; private onInteractionCreate; }