Send regular text in a message with an embed

So I'm trying to make my bot send a message that mentions a certain role when it sends an embed. I want the mention and embed to be in the same message if possible. If this is possible, how can I do it? A snippet of my code where the embed is sent is below.
const channel = interaction.client.channels.cache.get('1234249506027999234')
await channel.send({ embeds: [SSUEmbed] })
await interaction.reply({ content: 'The SSU has been announced.', ephemeral: true})
}
}
const channel = interaction.client.channels.cache.get('1234249506027999234')
await channel.send({ embeds: [SSUEmbed] })
await interaction.reply({ content: 'The SSU has been announced.', ephemeral: true})
}
}
5 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Squid
Squid7mo ago
You can send an object like { content, embeds } to the channel, with content being the plain text displayed above the embed
The Specialist
The SpecialistOP7mo ago
Like this? await channel.send({ '<@&1234293384462467123>', embeds: [SSUEmbed] }) Cuz that's giving me an error I'll send it in a sec
Squid
Squid7mo ago
Objects have both keys and values You need to specify the key content
The Specialist
The SpecialistOP7mo ago
I did the same thing right below it 💀 thank you Works now 🙂
Want results from more Discord servers?
Add your server