Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Hierarchy

  • default

Index

Constructors

constructor

Properties

Protected Optional author

author: { name: string; proxy_icon_url: string; url: string }

Type declaration

  • name: string
  • proxy_icon_url: string
  • url: string

Optional color

color: string | number

Protected Optional description

description: string

Protected Optional fields

fields: { inline?: boolean; name: string; value: string }[] = ...

Protected Optional footer

footer: { icon_url: string; proxy_icon_url: string; text: string }

Type declaration

  • icon_url: string
  • proxy_icon_url: string
  • text: string

Protected Optional image

image: Media

Protected Optional provider

provider: { name: string; url: string }

Type declaration

  • name: string
  • url: string

Protected Optional thumbnail

thumbnail: Media

Protected Optional timestamp

timestamp: Date

Protected Optional title

title: string

Protected type

type: EmbedType

Protected Optional url

url: string

Protected Optional video

video: Media

Methods

addField

  • addField(field: { inline?: boolean; name: string; value: string }): default
  • Parameters

    • field: { inline?: boolean; name: string; value: string }

      A field for embed

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

    Returns default

addFields

  • addFields(fields: { inline?: boolean; name: string; value: string }[]): default
  • Parameters

    • fields: { inline?: boolean; name: string; value: string }[]

      fields For embed

      embed.addFields([{ name: 'some name', value: 'some value' }])
      

    Returns default

setAuthor

  • setAuthor(name: string, opts?: { proxyIconUrl?: string; url?: string }): default
  • Parameters

    • name: string

      author name that should be displayed in embed

    • Optional opts: { proxyIconUrl?: string; url?: string }

      Extra options for author

      // without options
      embed.setAuthor('Some Name')
      
      // with options
      embed.setAuthor('Some Name', { url: 'https://cdn.discordapp.com/attachments/792884815631351869/.jpg' })
      
      • Optional proxyIconUrl?: string
      • Optional url?: string

    Returns default

setColor

  • setColor(code: string | number): default
  • Parameters

    • code: string | number

      color hex code for embed

      embed.setColor('#6f00ff')
      embed.setColor(0x6f00f)
      

    Returns default

setDescription

  • setDescription(description: string): default

setFooter

  • setFooter(footerText: string, opts?: { iconUrl?: string; proxyIconUrl?: string }): default
  • Parameters

    • footerText: string
    • Optional opts: { iconUrl?: string; proxyIconUrl?: string }
      • Optional iconUrl?: string
      • Optional proxyIconUrl?: string

    Returns default

setImage

  • setImage(imageUrl: string, opts?: { height?: number; proxyUrl?: string; width?: number }): default
  • Parameters

    • imageUrl: string

      Url of the image, this can also be a file name

    • Optional opts: { height?: number; proxyUrl?: string; width?: number }
      • Optional height?: number
      • Optional proxyUrl?: string
      • Optional width?: number

    Returns default

setProvider

  • setProvider(name: string, opts?: { url: string }): default
  • Parameters

    • name: string

      name of provider if exists

    • Optional opts: { url: string }
      • url: string

    Returns default

setThumbnail

  • setThumbnail(url: string, opts?: { height?: number; proxyUrl?: string; width?: number }): default
  • Parameters

    • url: string

      Url for thumbnail in embed

    • Optional opts: { height?: number; proxyUrl?: string; width?: number }

      Extra options for thumbnail.

      //without options
      embed.setThumbnail('https://cdn.discordapp.com/attachments/792884815631351869/.jpg')
      
      //with options
      embed.setThumbnail('https://cdn.discordapp.com/attachments/792884815631351869/.jpg', { height: 100, width:100 })
      
      • Optional height?: number
      • Optional proxyUrl?: string
      • Optional width?: number

    Returns default

setTimestamp

  • setTimestamp(time?: string | number | Date): default
  • Parameters

    • Optional time: string | number | Date

      timestamp for embed

      embed.setTimestamp()
      

    Returns default

setTitle

  • Parameters

    • title: string

      title for image embed

      embed.setTitle('some title');
      

    Returns default

setType

  • setType(type: EmbedType): default
  • Parameters

    • type: EmbedType

      The type of embed:

      • rich: The default
      • image
      • video
      • gif
      • article
      • link
        embed.setType('rich')
        

    Returns default

setUrl

  • Parameters

    • url: string

      url of embed

      
      embed.setUrl('https://discord.com')
      

    Returns default

setVideo

  • setVideo(url: string, opts?: { height: number; proxyUrl: string; width: number }): default
  • Parameters

    • url: string

      url for video in embed

    • Optional opts: { height: number; proxyUrl: string; width: number }

      extra options

      
      embed.setVideo('https://tinyurl.com/icehacks')
      
      • height: number
      • proxyUrl: string
      • width: number

    Returns default

Generated using TypeDoc