EmbedBuilder
EmbedBuilder is used to construct an embed object for a Discord message.
Usage:
Properties
Type
EmbedBuilder.Type :: table
An enumeration of embed types.
- Rich: “rich”
- Image: “image”
- Video: “video”
- Gif: “gifv”
- Article: “article”
- Link: “link”
Methods
setTitle
EmbedBuilder : setTitle () -> Builders.EmbedBuilder
title: string
Sets the title of the embed.
setType
EmbedBuilder : setType () -> Builders.EmbedBuilder
type: string
Sets the type of the embed.
setDescription
EmbedBuilder : setDescription () -> Builders.EmbedBuilder
description: string
Sets the description of the embed.
setUrl
EmbedBuilder : setUrl () -> Builders.EmbedBuilder
url: string
Sets the URL of the embed.
setTimestamp
EmbedBuilder : setTimestamp () -> Builders.EmbedBuilder
epoch: number
Sets the timestamp of the embed.
setColor
EmbedBuilder : setColor () -> Builders.EmbedBuilder
colorHex: HexLike | RGB
Sets the color of the embed.
setFooter
Sets the footer of the embed.
setImage
Sets the image of the embed.
setThumbnail
Sets the thumbnail of the embed.
setVideo
Sets the video of the embed.
setProvider
Sets the provider of the embed.
setAuthor
Sets the author of the embed.
addField
Adds a field to the embed.
toPayloadObject
EmbedBuilder : toPayloadObject () -> Network.Resolvable
Converts the embed to a JSON object that can be sent to the Discord API.
Functions
new
EmbedBuilder . new () -> ()
Creates a new instance of EmbedBuilder.