Embed
Implementation of discords Embed object as a Luau builder.
https://discord.com/developers/docs/resources/message#embed-object
Properties
The Embed instance has no set properties!
Methods
The Embed instance has no set methods!
Functions
setTitle
Embed . setTitle () -> ()
self: Embed
title: string
Set the title of the embed.
setType
Embed . setType () -> ()
self: Embed
type: apiTypes.EmbedType
Sets the Type of the embed.
setDescription
Embed . setDescription () -> ()
self: Embed
description: string
Set the description of the embed.
setUrl
Embed . setUrl () -> ()
self: Embed
url: string
Set the URL of the embed, URL will provide a hyperlinked title.
setTimestamp
Embed . setTimestamp () -> ()
self: Embed
timestamp: stdPolyfills.DateTime
Set the timestamp of the embed, timestamps will exist at the bottom/footer of the embed.
setColor
Embed . setColor () -> ()
self: Embed
color: number
Set the color of the embed, colors are numbers and in luau you can render hex as: 0x<HEX>
example:
- Red Color: 0xFF0000
- Green Color: 0x00FF00
- Blue Clor: 0x0000FF
setFooter
Embed . setFooter () -> ()
self: Embed
footer: embedFooter.JSON
Set the footer of the embed.
setImage
Embed . setImage () -> ()
self: Embed
image: embedImage.JSON
Set the image of the embed.
setThumbnail
Embed . setThumbnail () -> ()
self: Embed
thumbnail: embedThumbnail.JSON
Set the thumbnail of the embed.
setVideo
Embed . setVideo () -> ()
self: Embed
video: embedVideo.JSON
Set the video of the embed.
setProvider
Embed . setProvider () -> ()
self: Embed
provider: embedProvider.JSON
Set the provider of the embed.
setAuthor
Embed . setAuthor () -> ()
self: Embed
author: embedAuthor.JSON
Set the author of the embed.
addField
Embed . addField () -> ()
self: Embed
field: embedField.JSON
Add a field to the embeds.
build
Embed . build () -> ()
self: Embed
Responsible for building the Embed JSON that can be parsed by the Discord API.
new
Embed . new () -> ()
resource: {
title: string?,
type: apiTypes.EmbedType?,
description: string?,
url: string?,
timestamp: stdPolyfills.DateTime?,
color: number?,
footer: embedFooter.JSON?,
image: embedImage.JSON?,
thumbnail: embedThumbnail.JSON?,
video: embedVideo.JSON?,
provider: embedProvider.JSON?,
author: embedAuthor.JSON?,
fields: { embedField.JSON,
}
Responsible for creating a new Embed.