Class EmbedBuilder

Hierarchy

  • EmbedBuilder

Constructors

Properties

json: any
load: any

load json into this embed builder instance - use static loadFromJSON method

Param

the json to load

Returns

Methods

  • Add a blank field to the embed (zero width spaces).

    Parameters

    • Optional inline: boolean

      If the field should be displayed inline.

    Returns EmbedBuilder

  • Add a field to the embed.

    Parameters

    • name: string

      The field name.

    • value: string

      The field value.

    • Optional inline: boolean

      If the field should be inline.

    Returns EmbedBuilder

  • Add multiple fields.

    Parameters

    Returns EmbedBuilder

  • Get the current author.

    Returns undefined | EmbedAuthorOptions

  • Get the current color.

    Returns undefined | number

  • Get the current description.

    Returns undefined | string

  • Get the field at the specified index.

    Parameters

    • index: number

      The index of the field to get.

    Returns undefined | EmbedField

  • Get the current fields.

    Returns EmbedField[]

  • Get the current footer.

    Returns undefined | EmbedFooterOptions

  • Get the current image.

    Returns undefined | EmbedImageOptions

  • Get the current thumbnail.

    Returns undefined | EmbedImageOptions

  • Get the current timestamp.

    Returns undefined | string

  • Get the current timestamp as a date instance.

    Returns undefined | Date

  • Get the current title.

    Returns undefined | string

  • Get the current url.

    Returns undefined | string

  • remove the current author

    Returns EmbedBuilder

  • Remove the current color.

    Returns EmbedBuilder

  • Remove the current description.

    Returns EmbedBuilder

  • Remove the current footer.

    Returns EmbedBuilder

  • Remove the current image.

    Returns EmbedBuilder

  • Remove the current thumbnail.

    Returns EmbedBuilder

  • Remove the current timestamp.

    Returns EmbedBuilder

  • Remove the current title.

    Returns EmbedBuilder

  • Remove the current url.

    Returns EmbedBuilder

  • set the embed author

    Parameters

    • name: string

      The name of the author.

    • Optional iconURL: string

      An icon url for the author.

    • Optional url: string

      A url for the author.

    Returns EmbedBuilder

  • Set the embed color.

    Parameters

    • color: number

      The color.

    Returns EmbedBuilder

  • Set the embed description.

    Parameters

    • first: string | string[]
    • Rest ...other: (string | string[])[]

    Returns EmbedBuilder

  • Set the embed footer.

    Parameters

    • text: string

      The text.

    • Optional iconURL: string

      The icon url.

    Returns EmbedBuilder

  • Set the embed image.

    Parameters

    • url: string

      The Image url.

    Returns EmbedBuilder

  • Set the embed thumbnail.

    Parameters

    • url: string

      The thumbnail url.

    Returns EmbedBuilder

  • Set the embed timestamp.

    Parameters

    • time: string | Date

      An ISO 8601 timestamp, Date object, or "now".

    Returns EmbedBuilder

  • Set the embed title.

    Parameters

    • title: string

      The title.

    Returns EmbedBuilder

  • Set the embed url.

    Parameters

    • url: string

      The url.

    Returns EmbedBuilder

  • Convert this embed to a json object.

    Parameters

    • array: true

      If the returned value should be contained in an array.

    Returns [EmbedOptions]

  • Parameters

    • Optional array: false

    Returns EmbedOptions

  • Convert this embed to a raw json object.

    Parameters

    • array: true

      If the returned value should be contained in an array.

    Returns [RawEmbedOptions]

  • Parameters

    • Optional array: false

    Returns RawEmbedOptions

  • create an embed builder instance (or multiple) from the provided json

    Parameters

    • json: EmbedOptions

      the embed json - accepts singular & array

    Returns EmbedBuilder

  • Type Parameters

    • T extends boolean = false

    Parameters

    Returns T extends true
        ? EmbedBuilder
        : EmbedBuilder[]

Generated using TypeDoc