import { ApplicationCommandSubCommandData, ApplicationCommandSubGroupData, AutocompleteInteraction, ChatInputApplicationCommandData, ChatInputCommandInteraction, Collection, CommandInteractionOptionResolver, Snowflake } from 'discord.js'; import { APIApplicationCommandOptionBase } from 'discord-api-types/v10'; import { CommandDiscovery } from '../command.discovery.js'; export type RootCommandMeta = { guilds?: Snowflake[]; } & ChatInputApplicationCommandData; export type SubcommandGroupMeta = ApplicationCommandSubGroupData; export type SubcommandMeta = ApplicationCommandSubCommandData; export type SlashCommandMeta = RootCommandMeta | SubcommandGroupMeta | SubcommandMeta; export interface OptionMeta extends APIApplicationCommandOptionBase { resolver?: keyof CommandInteractionOptionResolver; } /** * Represents a slash command discovery. * @url https://necord.org/interactions/slash-commands */ export declare class SlashCommandDiscovery extends CommandDiscovery { private readonly subcommands; /** * Returns the command description. */ getDescription(): string; /** * Sets the command description. * @param command The command discovery. */ setSubcommand(command: SlashCommandDiscovery): void; /** * Ensures a subcommand exists. * @param command */ ensureSubcommand(command: SlashCommandDiscovery): SlashCommandDiscovery; /** * Returns the subcommand. * @param name */ getSubcommand(name: string): SlashCommandDiscovery | undefined; /** * Returns the subcommands. */ getSubcommands(): Collection; /** * Returns raw options from metadata. */ getRawOptions(): Record; /** * Returns the options. */ getOptions(): any; /** * Executes the command. * @param interaction * @param depth */ execute(interaction: ChatInputCommandInteraction | AutocompleteInteraction, depth?: number): any; /** * Returns whether the discovery is a slash command. */ isSlashCommand(): this is SlashCommandDiscovery; /** * Returns the JSON representation of the discovery. */ toJSON(): any; }