User - ```javascriptconst { Client, Events, Gate...

const { Client, Events, GatewayIntentBits } = require('discord.js');



const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessageReactions] });


client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});

client.on('message', message => {
if (message.content === "!avatar") {
const embed = new RichEmbed()
.setTitle('Avatar!')
.setAuthor("Your Avatar", message.author.avatarURL)
.setImage(message.author.avatarURL)
.setColor('RANDOM')
.setDescription('Avatar URL')
message.reply(embed)
}
});
// Log in to Discord with your client's token
client.login("");
const { Client, Events, GatewayIntentBits } = require('discord.js');



const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessageReactions] });


client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});

client.on('message', message => {
if (message.content === "!avatar") {
const embed = new RichEmbed()
.setTitle('Avatar!')
.setAuthor("Your Avatar", message.author.avatarURL)
.setImage(message.author.avatarURL)
.setColor('RANDOM')
.setDescription('Avatar URL')
message.reply(embed)
}
});
// Log in to Discord with your client's token
client.login("");
- Trying to make it where the code will send a embed after a command - No Error's
6 Replies
24
243y ago
Your code is wrong. You don't create embeds like that anymore and it's been like that since djs 11 You are either on a very old djs version or something. I suggest posting more information about your issue
Just A Person シ
then can you send the latter version?
Sawako
Sawako3y ago
It's best to stop copy-pasting and learn to use it
𝖄𝖚𝖌𝖊𝖓
Man has programming discord in his bio, can't even program
Sawako
Sawako3y ago
💀
Favna
Favna3y ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Want results from more Discord servers?
Add your server