import { CommandGroupBuilder, MessageCommandBuilder, SlashCommandBuilder, UserCommandBuilder } from "@discord-interactions/builders"; import { Snowflake } from "discord-api-types/globals"; import { APIApplicationCommand } from "discord-api-types/v10"; import { Component, MessageCommandContext, Modal, SlashCommandContext, UserCommandContext } from "../index.js"; import { CommandManager } from "../managers/CommandManager.js"; export interface ICommandBase { builder: Builder; handler: (ctx: Context) => Promise; components?: (Component | Modal)[]; } export declare abstract class RegisteredDiscordCommand { private manager; private lastSync?; lastSyncedAt?: Date; builder: Builder; components?: (Component | Modal)[]; id: Snowflake; constructor(manager: CommandManager, command: { builder: Builder; }); private synced; /** * Create this command in Discord */ create(): Promise; update(id?: Snowflake): Promise; /** * Delete this command from Discord */ delete(id?: Snowflake): Promise; /** * Sync this command with Discord */ sync(remoteCommand?: APIApplicationCommand): Promise; } export declare abstract class RegisteredCommandBase extends RegisteredDiscordCommand implements ICommandBase { handler: (ctx: Context) => Promise; constructor(manager: CommandManager, command: { builder: Builder; handler: (ctx: Context) => Promise; }); /** * Update this command's handler function * @param handler New command handler */ setHandler(handler: (ctx: Context) => Promise): void; }