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 toolkit17mo 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
KAVI17mo 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
unchillOP17mo ago
im sending "!send_embed" in the channel
KAVI
KAVI17mo 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
unchillOP17mo ago
How do I do that
d.js docs
d.js docs17mo ago
Suggestion for @unchill:guide Popular Topics: Using the embed constructor read more
KAVI
KAVI17mo ago
Read it carefully Also is that color code correct ?
unchill
unchillOP17mo ago
Okay thanks, yes it is
Cae
Cae17mo 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
unchillOP17mo ago
i figured it out, thanks
Cae
Cae17mo ago
Np
Want results from more Discord servers?
Add your server