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
24523d 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
JAP
Just A Person シ523d ago
then can you send the latter version?
S
Sawako523d ago
It's best to stop copy-pasting and learn to use it
YUG
Y U G E N522d ago
Man has programming discord in his bio, can't even program
S
Sawako522d ago
💀
F
Favna522d 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
More Posts
Ben855 - For autocomplete arguments in slash comma...For autocomplete arguments in slash commands, if the user enters something that wasn't available in Rhys - Is there a way to use preconditions to remo...Is there a way to use preconditions to remove redundant if checks? For example: ```typescript @AppTobyy - how do i fixhow do i fixTobyy -Jesse - How would one go about adding user permiss...How would one go about adding user permissions to a slash command? This is my first time working wiJesse - why am i getting this error?why am i getting this error?secondubly - Not sure if my googling is just insuf...Not sure if my googling is just insufficient but is there a way to add multiple users as a parameterbomi - That's what I did with that, but this can b...That's what I did with that, but this can be usefulNoxillio - sapphiretype is impossible to install...@sapphire/type is impossible to install on Apple Silicon systems.Noxillio - Is there any purpose to sapphireplugi...Is there any purpose to @sapphire/plugin-editable-commands anymore now that application commands areBen855 - How are most of y'all using IDhints in pr...How are most of y'all using IDhints in production? Are you just manually hard coding them every timeNytelife26 - can i use `ApplyOptions` with an app...can i use `@ApplyOptions` with an application command, and if so do I still need to use `registerChaRhys - Is it possible to put preconditions on butt...Is it possible to put preconditions on button interactions? Looking through the docs / code it didn'Fiery - Hi, just got a new laptop and I'm having s...Hi, just got a new laptop and I'm having some troubles with the @sapphire/type library. I can't get bomi - Seems this is a known problem on discords e...Seems this is a known problem on discords endbomi - Discord's sending big ints? ``(node12164) ...Discord's sending big ints? ``` --------------------------RATE LIMIT-------------------------- (nodkaname-png - Paginated message brokenPaginated message broken${j122j} - Is there any way I change the typescrip...Is there any way I change the typescript types for container.client to be my own client class? It exChaddiedaddie - I tried to follow the Getting sta...I tried to follow the "Getting started with Sapphire" part of the guide on the sapphire website and kaname-png - Why does this interaction option retu...Why does this interaction option return null?