Embeds

Create rich, beautiful embed messages in Discord.

Basic Embed

commands/info.js
bot.command.new('info', 'Show info', async function() {
await this.reply({
embeds: [{
title: 'Bot Information',
description: 'This is a Disflow bot!',
color: 0x00d9ff
}]
});
});

Result

Bot Information

This is a Disflow bot!

Embed with Fields

commands/stats.js
bot.command.new('stats', 'Server stats', async function() {
await this.reply({
embeds: [{
title: '${this.guild.name} Stats',
thumbnail: { url: this.guild.iconURL() },
fields: [
{ name: 'Members', value: this.guild.memberCount.toString(), inline: true },
{ name: 'Channels', value: this.guild.channels.cache.size.toString(), inline: true },
{ name: 'Roles', value: this.guild.roles.cache.size.toString(), inline: true },
{ name: 'Created', value: this.guild.createdAt.toDateString() }
],
color: this.vals.colors.primary
}]
});
});

Full Featured Embed

commands/profile.js
bot.command.new('profile', 'User profile', async function() {
const user = this.getUser('user') || this.user;
await this.reply({
embeds: [{
author: {
name: user.username,
icon_url: user.displayAvatarURL()
},
title: 'User Profile',
description: `Profile for ${user.tag}`,
thumbnail: { url: user.displayAvatarURL({ size: 256 }) },
fields: [
{ name: 'ID', value: user.id },
{ name: 'Joined', value: user.createdAt.toDateString() },
{ name: 'Bot?', value: user.bot ? 'Yes' : 'No', inline: true }
],
footer: {
text: 'Disflow Bot',
icon_url: this.client.user.displayAvatarURL()
},
timestamp: new Date(),
color: 0x00d9ff
}]
});
}, [{
name: 'user',
description: 'User to view',
type: 6,
required: false
}]);

Embed Properties

Basic

  • title - Main title (string)
  • description - Main text (string)
  • url - Makes title clickable (string)
  • color - Left border color (hex number: 0x00d9ff)

Images

  • thumbnail - Small image top-right ({ url: "..." })
  • image - Large image bottom ({ url: "..." })

Author

  • author.name - Name at top (string)
  • author.icon_url - Small icon next to name
  • author.url - Makes name clickable

Footer

  • footer.text - Text at bottom (string)
  • footer.icon_url - Small icon in footer
  • timestamp - Shows time (new Date())

Fields

  • fields - Array of field objects
  • field.name - Field title (string, required)
  • field.value - Field content (string, required)
  • field.inline - Display side-by-side (boolean, optional)

💡 Tips

Color Values

Use hex color codes as numbers:

color: 0x00d9ff // Cyan
color: 0xff0000 // Red
color: 0x00ff00 // Green
color: 0xffa500 // Orange

Field Limits

  • • Title: 256 characters max
  • • Description: 4096 characters max
  • • Fields: 25 fields max
  • • Field name: 256 characters max
  • • Field value: 1024 characters max
  • • Footer: 2048 characters max