import { AliasPiece } from '@sapphire/pieces'; import type { Awaitable } from '@sapphire/utilities'; import type { Message } from 'fuwa'; import { Restrict } from '../types/Enums'; import { UserError } from './UserError'; export interface CommandOptions extends AliasPiece.Options { description: string | null; nsfw?: boolean; restrictTo?: Restrict; } export interface CommandToJSON extends AliasPiece.JSON { description: string | null; restrictTo: Restrict | null; } export declare namespace Command { type Options = CommandOptions; type Context = AliasPiece.Context; type ToJSON = CommandToJSON; } export declare abstract class Command extends AliasPiece { /** * Command description * * @since 1.0.0 */ readonly description: string | null; /** * Whether this command should be only ran in NSFW channels * * @since 1.0.0 * @default false */ readonly nsfw: boolean; /** * Restricts this command to DMs or Guild Text Channels * * @since 1.0.0 * @default null */ readonly restrictTo: Restrict | null; constructor(context: AliasPiece.Context, options: CommandOptions); abstract run(message: Message, args: Array): Awaitable; runPreconditions(message: Message): UserError | true; toJSON(): CommandToJSON; }