Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/discordeno/packages/mod.ts>Embeds

Discord API library for Deno
Go to Latest
class Embeds
extends Array<Embed>
import { Embeds } from "https://deno.land/x/discordeno@17.0.0/packages/mod.ts";

Constructors

new
Embeds(enforceLimits?)

Properties

currentTotal: number

The amount of characters in the embed.

enforceLimits: boolean

Whether the limits should be enforced or not.

optional
file: EmbedFile

If a file is attached to the message it will be added here.

Methods

addBlankField(inline?)
addEmbed(embed?: Embed)
addField(
name: string,
value: string,
inline?,
)
attachFile(file: unknown, name: string)
fitData(data: string, max: number)

Get the last DiscordEmbed, if there is no it will create one

setAuthor(
name: string,
iconUrl?: string | User,
url?: string,
)
setColor(color: string)
setDescription(description: string | string[])
setFooter(text: string, icon?: string)
setFromEmbed(embed: Embed)
setFromJson(json: Record<string, any>)
setImage(url: string | User)
setThumbnail(url: string)
setTitle(title: string, url?: string)
setURL(url: string)
showEmbedCode(): DiscordEmbed[]