seyfert
    Preparing search index...

    Class File

    Represents a file component builder. Used to display files within containers.

    const file = new File()
    .setMedia('https://example.com/image.png')
    .setSpoiler();

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    data: Partial<TYPE> = {}

    Methods

    • Sets the ID for the file component.

      Parameters

      • id: number

        The ID to set.

      Returns File

      The updated File instance.

    • Sets the media URL for the file.

      Parameters

      • url: string

        The URL of the file to display.

      Returns File

      The updated File instance.

    • Sets whether the file should be visually marked as a spoiler.

      Parameters

      • spoiler: boolean = true

        Whether the file is a spoiler (defaults to true).

      Returns File

      The updated File instance.