Embed Help

Can someone tell me why this doesn't work.
const { EmbedBuilder } = require('discord.js');

if (message.content === '!send_embed') {
const embed = new EmbedBuilder()
.setTitle('Title')
.setDescription('Description')
.setColor(2829617);
}
});
const { EmbedBuilder } = require('discord.js');

if (message.content === '!send_embed') {
const embed = new EmbedBuilder()
.setTitle('Title')
.setDescription('Description')
.setColor(2829617);
}
});
11 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
KAVI
KAVI2y ago
Well.... are you sending the embed ? Or only creating it ? You have to send the created embed in the channel where the command is being used.
unchill
unchillOP2y ago
im sending "!send_embed" in the channel
KAVI
KAVI2y ago
I meant in the code. You're supposed to send the embed to the channel If you're not sending it in the first place
unchill
unchillOP2y ago
How do I do that
d.js docs
d.js docs2y ago
Suggestion for @unchill:guide Popular Topics: Using the embed constructor read more
KAVI
KAVI2y ago
Read it carefully Also is that color code correct ?
unchill
unchillOP2y ago
Okay thanks, yes it is
Cae
Cae2y ago
Do you have message intents on? Its on your discord dev page Also that command will send embed with values that you set. If you want to send custom embed you better use slash commands and options to create custom embed
unchill
unchillOP2y ago
i figured it out, thanks
Cae
Cae2y ago
Np
Want results from more Discord servers?
Add your server