import { BaseComponent, type BaseComponentData, type CanSpoiler } from './base.js'; import type { APIFileComponent } from 'discord-api-types/v10'; import { ComponentType } from 'discord-api-types/v9'; interface FileData extends BaseComponentData { file: string; name?: string; spoiler?: boolean; } declare class FileComponent extends BaseComponent implements CanSpoiler { constructor(data: FileData); get Type(): ComponentType.File; /** * The url of the file */ get File(): string; /** * The name of the file */ get Name(): string | undefined; get IsSpoiler(): boolean | undefined; /** * Sets the file URL. * * The value can be either: * - A filename, such as `my_image.png` * - An attachment URL in the format `attachment://` * * @example * fileComponent.file('attachment://my_image.png') * * @param url The file URL or filename. */ file(url: string): this; spoiler(spoiler?: boolean): this; /** * Sets the name of the file * @param name Name of the file */ name(name: string): this; clone(): this; toJSON(): APIFileComponent; } /** * Creates a new FileComponent * * The file can be either: * - A filename, such as `my_image.png` * - An attachment URL in the format `attachment://` * * @example * fileComponent.file('attachment://my_image.png') * * @param url The file URL or filename. */ export declare function fileItem(file: string): FileComponent; export type { FileComponent }; //# sourceMappingURL=file.d.ts.map