Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MessageEmbed
    • BetterEmbed

Index

Properties

Static LENGTH_LIMITS

LENGTH_LIMITS: { author: { name: number }; description: number; fields: { name: number; size: number; value: number }; footer: { text: number }; title: number }

Type declaration

  • author: { name: number }
    • name: number
  • description: number
  • fields: { name: number; size: number; value: number }
    • name: number
    • size: number
    • value: number
  • footer: { text: number }
    • text: number
  • title: number

Static TEMPLATES

TEMPLATES: TemplatesValues

author

author: null | MessageEmbedAuthor

color

color: null | number

Readonly createdAt

createdAt: null | Date

description

description: null | string

fields

fields: EmbedField[]

footer

footer: null | MessageEmbedFooter

Readonly hexColor

hexColor: null | `#${string}`

image

image: null | MessageEmbedImage

Readonly length

length: number

provider

provider: null | MessageEmbedProvider

thumbnail

thumbnail: null | MessageEmbedThumbnail

timestamp

timestamp: null | number

title

title: null | string

type

type: string
deprecated

url

url: null | string

Readonly video

video: null | MessageEmbedVideo

Methods

Static fromTemplate

  • fromTemplate<T, V>(template: T, values?: V): BetterEmbed
  • Type parameters

    Parameters

    • template: T
    • Optional values: V

    Returns BetterEmbed

Static isTemplate

  • isTemplate(key: string): key is string
  • Parameters

    • key: string

    Returns key is string

Static normalizeField

  • normalizeField(name: string, value: string, inline?: boolean): Required<EmbedFieldData>
  • Parameters

    • name: string
    • value: string
    • Optional inline: boolean

    Returns Required<EmbedFieldData>

Static normalizeFields

  • normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[]
  • Parameters

    • Rest ...fields: EmbedFieldData[] | EmbedFieldData[][]

    Returns Required<EmbedFieldData>[]

addField

  • addField(name: string, value: string, inline?: boolean): BetterEmbed
  • Parameters

    • name: string
    • value: string
    • Optional inline: boolean

    Returns BetterEmbed

addFields

  • addFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): BetterEmbed
  • Parameters

    • Rest ...fields: EmbedFieldData[] | EmbedFieldData[][]

    Returns BetterEmbed

checkSize

  • checkSize(field: "fields"): boolean | (({ index: number; limit: number } & { name: boolean }) & ({ index: number; limit: number } & { value: boolean }))
  • checkSize(field: keyof MessageEmbedOptions | "values"): boolean
  • checkSize(): {}
  • Parameters

    • field: "fields"

    Returns boolean | (({ index: number; limit: number } & { name: boolean }) & ({ index: number; limit: number } & { value: boolean }))

  • Parameters

    • field: keyof MessageEmbedOptions | "values"

    Returns boolean

  • Returns {}

cutIfTooLong

  • cutIfTooLong(): void
  • Returns void

setAuthor

  • setAuthor(name: string, iconURL?: string, url?: string): BetterEmbed
  • Parameters

    • name: string
    • Optional iconURL: string
    • Optional url: string

    Returns BetterEmbed

setColor

  • Parameters

    • color: ColorResolvable

    Returns BetterEmbed

setDescription

  • Parameters

    • description: string

    Returns BetterEmbed

setFields

  • setFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): BetterEmbed
  • Parameters

    • Rest ...fields: EmbedFieldData[] | EmbedFieldData[][]

    Returns BetterEmbed

setFooter

  • setFooter(text: string, iconURL?: string): BetterEmbed
  • Parameters

    • text: string
    • Optional iconURL: string

    Returns BetterEmbed

setImage

  • Parameters

    • url: string

    Returns BetterEmbed

setImageFromFile

  • setImageFromFile(attachment: MessageAttachment): void
  • Parameters

    • attachment: MessageAttachment

    Returns void

setThumbnail

  • Parameters

    • url: string

    Returns BetterEmbed

setThumbnailFromFile

  • setThumbnailFromFile(attachment: MessageAttachment): void
  • Parameters

    • attachment: MessageAttachment

    Returns void

setTimestamp

  • Parameters

    • Optional timestamp: number | Date

    Returns BetterEmbed

setTitle

  • Parameters

    • title: string

    Returns BetterEmbed

setURL

  • Parameters

    • url: string

    Returns BetterEmbed

spliceFields

  • spliceFields(index: number, deleteCount: number, ...fields: EmbedFieldData[] | EmbedFieldData[][]): BetterEmbed
  • Parameters

    • index: number
    • deleteCount: number
    • Rest ...fields: EmbedFieldData[] | EmbedFieldData[][]

    Returns BetterEmbed

throwIfTooLong

  • throwIfTooLong(field: keyof MessageEmbedOptions | "values"): void
  • Parameters

    • field: keyof MessageEmbedOptions | "values"

    Returns void

toJSON

  • toJSON(): unknown
  • Returns unknown

Constructors

constructor

  • Parameters

    Returns BetterEmbed

Generated using TypeDoc