Preview environment

class FileComponent

export class FileComponent extends Component<APIFileComponent>

Represents a file component

readonly
data : Readonly<APIFileComponent>

The API data associated with this component

Inherited from: Component

readonly
file : UnfurledMediaItem

The media associated with this file

readonly
id : APIFileComponent['id']

The id of this component

Inherited from: Component

readonly
spoiler : boolean

Whether this thumbnail is spoilered

readonly
type : APIFileComponent['type']

The type of the component

Inherited from: Component

equals(
other: this | APIFileComponent
) : boolean

Whether or not the given components are equal

Inherited from: Component

toJSON() : APIFileComponent

Returns the API-compatible JSON for this component