Tyler Mazur
Tyler Mazur

Reputation: 93

Discord.js V14 - adding a regular message with an embed,

everyone! I'm trying to ping a role in an embed, but it doesn't actually ping them it just says the mention. So I thought it would be easier to just have a normal message with it, but it doesn't work. I've tried this: message.channel.send(({ content: "<@&121251251124>", embeds: [embed], })) I've also tried: message.channel.send(( "<@&121251251124>" + {embeds: [embed]} )) But nothing works! Thanks for your help!

Upvotes: 1

Views: 1866

Answers (2)

Gleyveon
Gleyveon

Reputation: 65

I think you had it almost, you shouldn't be using (()) twice like that in the .send once () is enough. Here is an example:

const reply = new MessageEmbed()
    .setColor('#ff6610')
    .setTitle(`Your inner embed title`)
    .setDescription(`Your inner embed text`)

message.channel.send({content: `<@&875740259386793994>`, embeds: [reply]}).catch(console.error);

Upvotes: 2

user18253371
user18253371

Reputation:

message.channel.send({ content: '<@&ID>', embeds: [embed] }) is correct, I don't know why you use two (()), but, can you show your client code? The code where you create the client, also, does your bot has the administrator permission, not on a custom role, on the bot's role, if it does then try to put the bot's role on the top, above any other role, that should work, if not then there is something with your client

Upvotes: 2

Related Questions