Options
All
  • Public
  • Public/Protected
  • All
Menu

Discord Embed

Type parameters

  • Res: APIMessage | null = APIMessage

Hierarchy

  • Embed

Index

Constructors

constructor

  • new Embed<Res>(sendback?: (embed: Embed<Res>, reply: boolean, mention: boolean, ephermal: boolean) => Promise<Res>): Embed<Res>
  • Type parameters

    • Res: null | APIMessage = APIMessage

    Parameters

    • Optional sendback: (embed: Embed<Res>, reply: boolean, mention: boolean, ephermal: boolean) => Promise<Res>
        • (embed: Embed<Res>, reply: boolean, mention: boolean, ephermal: boolean): Promise<Res>
        • Parameters

          • embed: Embed<Res>
          • reply: boolean
          • mention: boolean
          • ephermal: boolean

          Returns Promise<Res>

    Returns Embed<Res>

Properties

obj

obj: APIEmbed = ...

Methods

author

  • author(name?: string, icon?: string, url?: string): Embed<Res>
  • Sets author

    Parameters

    • Optional name: string

      Name of author

    • Optional icon: string

      Author avatar icon

    • Optional url: string

      URL anchored to the author name

    Returns Embed<Res>

color

  • color(color: number | "Lavender" | "Thistle" | "Plum" | "Violet" | "Orchid" | "Fuchsia" | "Magenta" | "MediumOrchid" | "MediumPurple" | "BlueViolet" | "DarkViolet" | "DarkOrchid" | "DarkMagenta" | "Purple" | "Indigo" | "DarkSlateBlue" | "SlateBlue" | "MediumSlateBlue" | "Pink" | "LightPink" | "HotPink" | "DeepPink" | "PaleVioletRed" | "MediumVioletRed" | "LightSalmon" | "Salmon" | "DarkSalmon" | "LightCoral" | "IndianRed" | "Crimson" | "FireBrick" | "DarkRed" | "Red" | "OrangeRed" | "Tomato" | "Coral" | "DarkOrange" | "Orange" | "Yellow" | "LightYellow" | "LemonChiffon" | "LightGoldenrodYellow" | "PapayaWhip" | "Moccasin" | "PeachPuff" | "PaleGoldenrod" | "Khaki" | "DarkKhaki" | "Gold" | "Cornsilk" | "BlanchedAlmond" | "Bisque" | "NavajoWhite" | "Wheat" | "BurlyWood" | "Tan" | "RosyBrown" | "SandyBrown" | "Goldenrod" | "DarkGoldenrod" | "Peru" | "Chocolate" | "SaddleBrown" | "Sienna" | "Brown" | "Maroon" | "DarkOliveGreen" | "Olive" | "OliveDrab" | "YellowGreen" | "LimeGreen" | "Lime" | "LawnGreen" | "Chartreuse" | "GreenYellow" | "SpringGreen" | "MediumSpringGreen" | "LightGreen" | "PaleGreen" | "DarkSeaGreen" | "MediumSeaGreen" | "SeaGreen" | "ForestGreen" | "Green" | "DarkGreen" | "MediumAquamarine" | "Aqua" | "Cyan" | "LightCyan" | "PaleTurquoise" | "Aquamarine" | "Turquoise" | "MediumTurquoise" | "DarkTurquoise" | "LightSeaGreen" | "CadetBlue" | "DarkCyan" | "Teal" | "LightSteelBlue" | "PowderBlue" | "LightBlue" | "SkyBlue" | "LightSkyBlue" | "DeepSkyBlue" | "DodgerBlue" | "CornflowerBlue" | "SteelBlue" | "RoyalBlue" | "Blue" | "MediumBlue" | "DarkBlue" | "Navy" | "MidnightBlue" | "White" | "Snow" | "Honeydew" | "MintCream" | "Azure" | "AliceBlue" | "GhostWhite" | "WhiteSmoke" | "Seashell" | "Beige" | "OldLace" | "FloralWhite" | "Ivory" | "AntiqueWhite" | "Linen" | "LavenderBlush" | "MistyRose" | "Gainsboro" | "LightGray" | "Silver" | "DarkGray" | "Gray" | "DimGray" | "LightSlateGray" | "SlateGray" | "DarkSlateGray" | "Black"): Embed<Res>
  • Sets the color

    Parameters

    • color: number | "Lavender" | "Thistle" | "Plum" | "Violet" | "Orchid" | "Fuchsia" | "Magenta" | "MediumOrchid" | "MediumPurple" | "BlueViolet" | "DarkViolet" | "DarkOrchid" | "DarkMagenta" | "Purple" | "Indigo" | "DarkSlateBlue" | "SlateBlue" | "MediumSlateBlue" | "Pink" | "LightPink" | "HotPink" | "DeepPink" | "PaleVioletRed" | "MediumVioletRed" | "LightSalmon" | "Salmon" | "DarkSalmon" | "LightCoral" | "IndianRed" | "Crimson" | "FireBrick" | "DarkRed" | "Red" | "OrangeRed" | "Tomato" | "Coral" | "DarkOrange" | "Orange" | "Yellow" | "LightYellow" | "LemonChiffon" | "LightGoldenrodYellow" | "PapayaWhip" | "Moccasin" | "PeachPuff" | "PaleGoldenrod" | "Khaki" | "DarkKhaki" | "Gold" | "Cornsilk" | "BlanchedAlmond" | "Bisque" | "NavajoWhite" | "Wheat" | "BurlyWood" | "Tan" | "RosyBrown" | "SandyBrown" | "Goldenrod" | "DarkGoldenrod" | "Peru" | "Chocolate" | "SaddleBrown" | "Sienna" | "Brown" | "Maroon" | "DarkOliveGreen" | "Olive" | "OliveDrab" | "YellowGreen" | "LimeGreen" | "Lime" | "LawnGreen" | "Chartreuse" | "GreenYellow" | "SpringGreen" | "MediumSpringGreen" | "LightGreen" | "PaleGreen" | "DarkSeaGreen" | "MediumSeaGreen" | "SeaGreen" | "ForestGreen" | "Green" | "DarkGreen" | "MediumAquamarine" | "Aqua" | "Cyan" | "LightCyan" | "PaleTurquoise" | "Aquamarine" | "Turquoise" | "MediumTurquoise" | "DarkTurquoise" | "LightSeaGreen" | "CadetBlue" | "DarkCyan" | "Teal" | "LightSteelBlue" | "PowderBlue" | "LightBlue" | "SkyBlue" | "LightSkyBlue" | "DeepSkyBlue" | "DodgerBlue" | "CornflowerBlue" | "SteelBlue" | "RoyalBlue" | "Blue" | "MediumBlue" | "DarkBlue" | "Navy" | "MidnightBlue" | "White" | "Snow" | "Honeydew" | "MintCream" | "Azure" | "AliceBlue" | "GhostWhite" | "WhiteSmoke" | "Seashell" | "Beige" | "OldLace" | "FloralWhite" | "Ivory" | "AntiqueWhite" | "Linen" | "LavenderBlush" | "MistyRose" | "Gainsboro" | "LightGray" | "Silver" | "DarkGray" | "Gray" | "DimGray" | "LightSlateGray" | "SlateGray" | "DarkSlateGray" | "Black"

      Color hex code

    Returns Embed<Res>

description

  • description(desc: string): Embed<Res>

field

  • field(name: string, value: string, inline?: boolean): Embed<Res>
  • Adds a field

    Parameters

    • name: string

      Fields title

    • value: string

      Fields value

    • Optional inline: boolean

      Whether the field is inline

    Returns Embed<Res>

footer

  • footer(text?: string, icon?: string): Embed<Res>
  • Sets the footer

    Parameters

    • Optional text: string

      Text for footer

    • Optional icon: string

      Small icon on the bottom left

    Returns Embed<Res>

image

  • image(url: string, width?: number, height?: number): Embed<Res>
  • Sets the image

    Parameters

    • url: string

      URL of image

    • Optional width: number

      Optional fixed width

    • Optional height: number

      Optional fixed height

    Returns Embed<Res>

render

  • render(): APIEmbed

send

  • send(reply?: boolean, mention?: boolean, ephermal?: boolean): Promise<Res>
  • Sends embed to channel

    Parameters

    • reply: boolean = true

      Whether or not to do so in an inline reply (defaults to true)

    • mention: boolean = false

      Whether or not to mention the user in the reply (defaults to false)

    • ephermal: boolean = false

    Returns Promise<Res>

thumbnail

  • thumbnail(url: string, width?: number, height?: number): Embed<Res>
  • Sets the thumbnail

    Parameters

    • url: string

      URL of thumbnail

    • Optional width: number

      Optional fixed width

    • Optional height: number

      Optional fixed height

    Returns Embed<Res>

timestamp

  • timestamp(date?: Date): Embed<Res>

title

  • title(title?: string, url?: string): Embed<Res>
  • Sets the title

    Parameters

    • Optional title: string

      Title name

    • Optional url: string

      URL anchored to title name

    Returns Embed<Res>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc