Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Embed

Handles Embed creation and received embeds

Hierarchy

  • Embed

Implements

  • APIEmbedData

Index

Constructors

constructor

  • new Embed(data?: APIEmbedData): Embed

Properties

Optional author

author: APIEmbedAuthorData

The embed author data.

since

0.0.1

Optional color

color: undefined | number

The embed bar color.

since

0.0.1

Optional description

description: undefined | string

The embed description.

since

0.0.1

fields

fields: APIEmbedFieldData[]

Embed Fields.

since

0.0.1

Optional footer

footer: APIEmbedFooterData

The embed footer data.

since

0.0.1

Optional image

image: APIEmbedImageData

The embed image data.

since

0.0.1

Optional provider

provider: APIEmbedProviderData

Received data about the embed provider.

since

0.0.1

Optional thumbnail

thumbnail: APIEmbedImageData

The embed thumbnail data.

since

0.0.1

Optional timestamp

timestamp: undefined | string

The timestamp of the embed.

since

0.0.1

Optional title

title: undefined | string

The embed title.

since

0.0.1

Optional type

type: EmbedType

The type of embed.

since

0.0.1

Optional url

url: undefined | string

The embed url.

since

0.0.1

Optional video

video: APIEmbedVideoData

Received video data.

since

0.0.1

Accessors

createdAt

  • get createdAt(): Date | null

hexColor

  • get hexColor(): string | null

Methods

addBlankField

  • addBlankField(inline?: undefined | false | true): this
  • Adds a blank field to the embed

    Parameters

    • Optional inline: undefined | false | true

      If the field should be inline with other fields

    Returns this

addField

setAuthor

setColor

  • setColor(color?: undefined | number): this

setDescription

setFooter

setImage

setThumbnail

setTimestamp

  • setTimestamp(timestamp?: number | Date): this

setTitle

setURL

spliceField

  • Deletes and/or inserts fields by index in the embed

    Parameters

    • index: number

      The index to start at

    • deleteCount: number

      How many fields to delete

    • Optional name: StringResolvable

      The field name to insert

    • Optional value: StringResolvable

      The field value to insert

    • Optional inline: undefined | false | true

      If the inserted field is inline

    Returns this

updateAuthor

  • updateAuthor(data: APIEmbedAuthorData): this

updateFooter

  • updateFooter(data: APIEmbedFooterData): this

updateImage

  • updateImage(data: APIEmbedImageData): this

updateThumbnail

  • updateThumbnail(data: APIEmbedImageData): this

updateTimestamp

  • updateTimestamp(): this

Static Private checkField

Generated using TypeDoc