import { PossiblyTranslatable } from '../../interfaces/Translatable'; import { OptionType } from '../constants/OptionType'; import type { BigIntegerOption } from '../options/BigIntegerOption'; import type { BooleanOption } from '../options/BooleanOption'; import type { ChannelOption } from '../options/ChannelOption'; import type { EmojiOption } from '../options/EmojiOption'; import type { GuildOption } from '../options/GuildOption'; import type { IntegerOption } from '../options/IntegerOption'; import type { NumberOption } from '../options/NumberOption'; import type { RoleOption } from '../options/RoleOption'; import type { StringOption } from '../options/StringOption'; import type { OptionUser } from '../options/UserOption'; import { CommandPermissionDefaults } from './CommandDefinition'; import type { SuppressorDefinition } from './Suppressor'; export declare type AnyCommandOption = AnySubCommandOption | AnyValueCommandOption; export declare type AnySubCommandOption = CommandOptionSubCommandGroup | CommandOptionSubCommand; export declare type AnyValueCommandOption = CommandOptionPrimitive | CommandOptionDiscord | CommandOptionValue; export interface CommandOption { /** The type of the option */ type: T; /** The name of the option */ name: string | [string, ...Array]; /** The description of the option */ description?: PossiblyTranslatable; /** Domain-specific options */ extra?: Record; } export interface CommandOptionValue extends CommandOption { /** The default value of the option */ default?: U; /** If the option is required */ required?: boolean; /** If the option is expected to be an array */ array?: boolean; /** Consume the "rest" of available phrases */ rest?: boolean; /** Limit how many phrases "rest" will consume */ limit?: number; } export interface CommandOptionChoice { label: PossiblyTranslatable; value: T; description?: PossiblyTranslatable; } export declare type CommandOptionChoiceCallable = Array> | (() => Promise>>); export interface CommandOptionSubCommandGroup extends CommandOption { /** The description of the option */ description: PossiblyTranslatable; /** The subcommands of the option */ options: Array; /** Use custom permission name, instead of the first element of name */ permissionName?: string; /** Should this permission be granted, and by extension, the subcommandgroup be executable when no permission overrides exist */ permissionDefaults?: CommandPermissionDefaults | boolean; /** Any suppressors to execute */ suppressors?: Array; /** Hide this subcommand group from general users */ hidden?: boolean; } export interface CommandOptionSubCommand extends CommandOption { /** The description of the option */ description: PossiblyTranslatable; /** The subcommands of the option */ options?: Array; /** Use custom permission name, instead of the first element of name */ permissionName?: string; /** Should this permission be granted, and by extension, the subcommand be executable when no permission overrides exist */ permissionDefaults?: CommandPermissionDefaults | boolean; /** Any suppressors to execute */ suppressors?: Array; /** Hide this subcommand from general users */ hidden?: boolean; } export declare type CommandOptionPrimitive = BooleanOption | IntegerOption | StringOption | NumberOption | BigIntegerOption; export declare type CommandOptionDiscord = OptionUser | ChannelOption | RoleOption | EmojiOption | GuildOption;