@discord-types/builders/embed/embed
API reference for @discord-types/builders/embed/embed
@discord-types/builders/embed/embed
Types
Embed
Raw Type
type Embed = Embed.Prototype, & {
title: string?,
type: embedTypes.EmbedType?,
description: string?,
url: string?,
timestamp: number?,
color: number?,
footer: embedFooter.JSON?,
image: embedImage.JSON?,
thumbnail: embedThumbnail.JSON?,
video: embedVideo.JSON?,
provider: embedProvider.JSON?,
author: embedAuthor.JSON?,
fields: {embedField.JSON}
}
Intersection with variants:
Variant 2
Prop | Type | Description |
---|---|---|
title? | - | |
type? | - | |
description? | - | |
url? | - | |
timestamp? | - | |
color? | - | |
footer? | - | |
image? | - | |
thumbnail? | - | |
video? | - | |
provider? | - | |
author? | - | |
fields | - |
JSON
Raw Type
type JSON = Embed.Prototype.build(nil :: any),
Functions
Embed.Prototype.setTitle
[[ Set the title of the embed. ]]
Function Signature
--[[
Set the title of the embed.
]]
function Embed.Prototype.setTitle(self: Embed, title: string) -> Embed end
Arguments
title
Returns
ret1
Embed.Prototype.setType
[[ Sets the Type of the embed. ]]
Function Signature
--[[
Sets the Type of the embed.
]]
function Embed.Prototype.setType(self: Embed, type: embedTypes.EmbedType) -> Embed end
Arguments
type
Returns
ret1
Embed.Prototype.setDescription
[[ Set the description of the embed. ]]
Function Signature
--[[
Set the description of the embed.
]]
function Embed.Prototype.setDescription(self: Embed, description: string) -> Embed end
Arguments
description
Returns
ret1
Embed.Prototype.setUrl
[[ Set the URL of the embed, URL will provide a hyperlinked title. ]]
Function Signature
--[[
Set the URL of the embed, URL will provide a hyperlinked title.
]]
function Embed.Prototype.setUrl(self: Embed, url: string) -> Embed end
Arguments
url
Returns
ret1
Embed.Prototype.setTimestamp
[[ Set the timestamp of the embed, timestamps will exist at the bottom/footer of the embed. ]]
Function Signature
--[[
Set the timestamp of the embed, timestamps will exist at the bottom/footer of the embed.
]]
function Embed.Prototype.setTimestamp(self: Embed, timestamp: datetime.DateTime) -> Embed end
Arguments
timestamp
Returns
ret1
Embed.Prototype.setColor
[[ 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 ]]
Function Signature
--[[
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
]]
function Embed.Prototype.setColor(self: Embed, color: number) -> Embed end
Arguments
color
Returns
ret1
Embed.Prototype.setFooter
[[ Set the footer of the embed. ]]
Function Signature
--[[
Set the footer of the embed.
]]
function Embed.Prototype.setFooter(self: Embed, footer: embedFooter.JSON) -> Embed end
Arguments
footer
Returns
ret1
Embed.Prototype.setImage
[[ Set the image of the embed. ]]
Function Signature
--[[
Set the image of the embed.
]]
function Embed.Prototype.setImage(self: Embed, image: embedImage.JSON) -> Embed end
Arguments
image
Returns
ret1
Embed.Prototype.setThumbnail
[[ Set the thumbnail of the embed. ]]
Function Signature
--[[
Set the thumbnail of the embed.
]]
function Embed.Prototype.setThumbnail(self: Embed, thumbnail: embedThumbnail.JSON) -> Embed end
Arguments
thumbnail
Returns
ret1
Embed.Prototype.setVideo
[[ Set the video of the embed. ]]
Function Signature
--[[
Set the video of the embed.
]]
function Embed.Prototype.setVideo(self: Embed, video: embedVideo.JSON) -> Embed end
Arguments
video
Returns
ret1
Embed.Prototype.setProvider
[[ Set the provider of the embed. ]]
Function Signature
--[[
Set the provider of the embed.
]]
function Embed.Prototype.setProvider(self: Embed, provider: embedProvider.JSON) -> Embed end
Arguments
provider
Returns
ret1
Embed.Prototype.setAuthor
[[ Set the author of the embed. ]]
Function Signature
--[[
Set the author of the embed.
]]
function Embed.Prototype.setAuthor(self: Embed, author: embedAuthor.JSON) -> Embed end
Arguments
author
Returns
ret1
Embed.Prototype.addField
[[ Add a field to the embeds. ]]
Function Signature
--[[
Add a field to the embeds.
]]
function Embed.Prototype.addField(self: Embed, field: embedField.JSON) -> Embed end
Arguments
field
Returns
ret1
Embed.Prototype.build
[[ Responsible for building the Embed JSON that can be parsed by the Discord API. ]]
Function Signature
--[[
Responsible for building the Embed JSON that can be parsed by the Discord API.
]]
function Embed.Prototype.build(self: Embed) -> JSON end
Returns
ret1
Embed.Interface.new
[[ Responsible for creating a new Embed.
```lua
``` ]]
Function Signature
--[[
Responsible for creating a new Embed.
\`\`\`lua
\`\`\`
]]
function Embed.Interface.new(resource: {
title: string?,
type: embedTypes.EmbedType?,
description: string?,
url: string?,
timestamp: datetime.DateTime?,
color: number?,
footer: embedFooter.JSON?,
image: embedImage.JSON?,
thumbnail: embedThumbnail.JSON?,
video: embedVideo.JSON?,
provider: embedProvider.JSON?,
author: embedAuthor.JSON?,
fields: {embedField.JSON}
}?) -> Embed end
Arguments
resource
This field is optional and may not be specified
{title: string?, type: embedTypes.EmbedType?, description: string?, url: string?, timestamp: datetime.DateTime?, color: number?, footer: embedFooter.JSON?, image: embedImage.JSON?, thumbnail: embedThumbnail.JSON?, video: embedVideo.JSON?, provider: embedProvider.JSON?, author: embedAuthor.JSON?, fields: {embedField.JSON}}?
Returns
ret1
Last updated on