What you need to do is : go in your main file(like index.js) and set in top of code this :
const Discord = require('discord.js');
Then where command 'embed' is you need to set this :
if(command === 'embed'){
client.commands.get('embed').execute(message, args, Discord);
Then in your command folder you will make a file named embed.js . In embed.js you need to set this code:
module.exports = {
name: 'embed',
description: 'Embed Test',
execute(message, args, Discord){
const newEmbed = new Discord.MessageEmbed()
.setTitle('Your Title')
.setColor('RANDOM')
.setFooter('Some Footer here', 'another footer here' )
.setDescription('> ?testa
' + '> ?testb
' + '> testc');
message.delete();
message.channel.send(newEmbed);
}
});
And you get only the description after command and message with command ([prefix]embed) will delete after you post it !
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…