# Embeds
Here are a few examples showcasing how easy it is to create embeds with the RichEmbed builder.
# Simple Title Flashcard
const Chariot = require('chariot.js');
message.channel.createEmbed(new Chariot.RichEmbed()
.setColor('ORANGE')
.setTitle('This is a title only embed!')
);
# Attaching & Using Image Files
const Chariot = require('chariot.js');
message.channel.createEmbed(new Chariot.RichEmbed()
.setColor('#FF0000')
.setTitle('Image Attachment Example')
.setDescription('This is an example to showcase attachment usage for integrated embed images')
.attachFile({ file: someFileBuffer, name: 'myFile.png' })
.setImage('attachments://myFile.png')
);
# Adding Timestamps
const Chariot = require('chariot.js');
message.channel.createEmbed(new Chariot.RichEmbed()
.setColor('RANDOM')
.setTitle('Timestamp Example')
.setDescription('This is an example to showcase timestamp usage')
.setTimestamp('2019-09-30T16:41:56Z')
);
# Adding Images and Thumbnails
const Chariot = require('chariot.js');
message.channel.createEmbed(new Chariot.RichEmbed()
.setColor(0xFF9185)
.setTitle('Images Example')
.setDescription('This is an example to showcase image usage')
.setThumbnail('https://i.imgur.com/AVzMCB8.png')
.setImage('https://i.imgur.com/mSecJnk.gif')
);
# Adding Fields
const Chariot = require('chariot.js');
message.channel.createEmbed(new Chariot.RichEmbed()
.setColor(15105570)
.setTitle('Fields Example')
.setDescription('This is an example to showcase fields')
.addField('Field Title', 'Field Body', true)
.addBlankField(true)
.addField('Another Title', 'Another Body', false)
);
# Embeds Without Property Chaining
const Chariot = require('chariot.js');
const myEmbed = new Chariot.RichEmbed();
myEmbed.setAuthor('Google', 'https://google.com/logo.png', 'https://google.com');
myEmbed.setColor('BLURPLE');
message.channel.createEmbed(myEmbed);