import { Env } from "../../client/index.js"; import { MessageResponse, ModalResponse } from "../index.js"; import { APIChatInputApplicationCommandInteraction, APIInteractionResponseChannelMessageWithSource, APIInteractionResponseDeferredChannelMessageWithSource, APIMessageApplicationCommandInteraction, APIModalInteractionResponse, APIUserApplicationCommandInteraction, ApplicationCommandType, Locale } from 'discord-api-types/v10'; export interface CommandData { name: string; name_localizations?: { [key in Locale]: string; }; dm_permission?: boolean; default_member_permissions?: string; nsfw?: boolean; } export declare type CommandResponse = ModalResponse | MessageResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIModalInteractionResponse; export declare type ChatCommandExecutor = (message: APIChatInputApplicationCommandInteraction, env: Env) => CommandResponse | Promise; export declare type UserCommandExecutor = (message: APIUserApplicationCommandInteraction, env: Env) => CommandResponse | Promise; export declare type MessageCommandExecutor = (message: APIMessageApplicationCommandInteraction, env: Env) => CommandResponse | Promise; export declare abstract class Command { data: CommandData; protected type: ApplicationCommandType; executor: ChatCommandExecutor | UserCommandExecutor | MessageCommandExecutor | undefined; protected constructor(options?: { data?: CommandData; }); setName(name: string): this; setNameLocalizations(localizations: { [key in Locale]: string; }): this; setDMPermission(permission: boolean): this; setDefaultMemberPermissions(permission: string): this; toJSON(): CommandData; }