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 toolkit•3y 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
KAVI•3y 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
unchillOP•3y ago
im sending "!send_embed" in the channel
KAVI
KAVI•3y 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
unchillOP•3y ago
How do I do that
d.js docs
d.js docs•3y ago
Suggestion for @unchill:guide Popular Topics: Using the embed constructor read more
KAVI
KAVI•3y ago
Read it carefully Also is that color code correct ?
unchill
unchillOP•3y ago
Okay thanks, yes it is
Cae
Cae•3y 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
unchillOP•3y ago
i figured it out, thanks
Cae
Cae•3y ago
Np

Did you find this page helpful?