how to send an embed message discord.js
let Embed = new Discord.MessageEmbed()
.setTitle()
.setAuthor()
.setColor()
.addField()
.setDescription()
.setThumbnail()
how to send an embed message discord.js
let Embed = new Discord.MessageEmbed()
.setTitle()
.setAuthor()
.setColor()
.addField()
.setDescription()
.setThumbnail()
Embed Example Discord.js
const embed = new Discord.RichEmbed() //Ver 11.5.1 of Discord.js
.setTitle("This is a title")
.setTitle("http://tryitands.ee")
.setDescription("This is a description")
.setTimestamp()
.setFooter("This is a footer")
.setAuthor("This is the author's name", //and this its profile pic)
.addField("This is a field", "this is its description")
.setImage("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
.setThumbnail("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
<message>.<channel>.send(embed)
Discord embeds
const Discord = require("discord.js")
const embed = new Discord.MessageEmbed() // Ver 12.2.0 of Discord.js
.setTitle("This is a title")
.setDescription("This is a description")
.setTimestamp()
.setFooter("This is a footer")
.setAuthor("This is the author's name", //and this its profile pic)
.addField("This is a field", "this is its description")
.setImage("https://images-ext-2.discordapp.net/external/cC-YBJkH2GXnX7MHMASUM9Gle1S1im3rDJj2K54A28w/%3Fcid%3D73b8f7b19a5ccc575679c0a7fc4a673b753e4ce993f35223%26rid%3Dgiphy.mp4/https/media2.giphy.com/media/Q8bEDnj9hZd6vivXSZ/giphy.mp4")
.setThumbnail("https://images-ext-2.discordapp.net/external/cC-YBJkH2GXnX7MHMASUM9Gle1S1im3rDJj2K54A28w/%3Fcid%3D73b8f7b19a5ccc575679c0a7fc4a673b753e4ce993f35223%26rid%3Dgiphy.mp4/https/media2.giphy.com/media/Q8bEDnj9hZd6vivXSZ/giphy.mp4")
<message>.<channel>.send(embed) // Remove the brackets <>
discord.js embed
const exampleEmbed = {
color: 0x0099ff,
title: 'Some title',
url: 'https://discord.js.org',
author: {
name: 'Some name',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
url: 'https://discord.js.org',
},
description: 'Some description here',
thumbnail: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
fields: [
{
name: 'Regular field title',
value: 'Some value here',
},
{
name: '\u200b',
value: '\u200b',
inline: false,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
],
image: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
timestamp: new Date(),
footer: {
text: 'Some footer text here',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
},
};
message.channel.send({ embed: exampleEmbed });
discord embed description
// at the top of your file
const Discord = require('discord.js');
// inside a command, event listener, etc.
const exampleEmbed = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle('Some title')
.setURL('https://discord.js.org/')
.setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
.setDescription('Some description here')
.setThumbnail('https://i.imgur.com/wSTFkRM.png')
.addFields(
{ name: 'Regular field title', value: 'Some value here' },
{ name: '\u200B', value: '\u200B' },
{ name: 'Inline field title', value: 'Some value here', inline: true },
{ name: 'Inline field title', value: 'Some value here', inline: true },
)
.addField('Inline field title', 'Some value here', true)
.setImage('https://i.imgur.com/wSTFkRM.png')
.setTimestamp()
.setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');
channel.send(exampleEmbed);
make a discord message embed
//command handlers dont do this if you already have them
exports.run = async (client, message, args) => {
//define the embed with let, const, or var
var EmbedMessage = new Discord.MessageEmbed()
.setColor('red')
.setImage('You can set a image view link from tenor or something just makesure it has https:// in it')
.setURL('set a url here for ex: https://google.com/ just make sure it's https://')
.setFooter('this part is the end of the embed you can define the bots logo and tag here by doing client.user.displayAvatarURL, client.user.tag')
//finnaly now to send the message do this
message.channel.send('EmbedMessage') //Ur embed variable name there
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us