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

x/oasis/packages/builders/mod.ts>MessageEmbed

An object oriented Discordeno framework
Latest
class MessageEmbed
import { MessageEmbed } from "https://deno.land/x/oasis@2.1.0/packages/builders/mod.ts";

MessageEmbed constructor inspired by discord.js

Examples

const embed = new MessageEmbed() .setTitle("Hello, world!");

Constructors

new
MessageEmbed(safe?, embed?: Discord.Embed)

Properties

embed: Discord.Embed & { fields: Discord.DiscordEmbedField[]; }
safe: boolean
total: number

Methods

author(
name: string,
iconUrl?: string,
url?: string,
proxyIconUrl?: string,
)

sets the author of the current embed

blank(inline?)

adds a blank field to the current embed

color(color:
| number
| [number, number, number]
| `#${string}`
| "random"
)

sets the color of the current embed

description(description: string)

sets the description of the current embed

equal(embed: MessageEmbed | Discord.Embed)
field(
name: string,
value: string,
inline?,
)

adds a field to the current embed

fields(fields: { name: string; value: string; inline?: boolean; }[])

sets the fields of the current embed

image(
url: string,
proxyUrl?: string,
height?: number,
width?: number,
)

sets the image of the current embed

provider(name: string, url: string)
thumbnail(
url: string,
proxyUrl?: string,
height?: number,
width?: number,
)

sets the thumbnail of the current embed

timestamp(timestamp: number | Date)

sets the timestamp of the current embed

title(title: string)

sets the title of the current embed

url(url: string)

sets the url of the current embed

video(
url?: string,
proxyUrl?: string,
height?: number,
width?: number,
)

sets the video of the current embed

Static Methods

from(json?: Discord.Embed, safe?)