I want to ping a specific role in a discord embed. I tried <@652878254927249420>
but it only work on a classic message. Is it possible to ping a role in an embed ? If yes how can I do it ?
I want to ping a specific role in a discord embed. I tried <@652878254927249420>
but it only work on a classic message. Is it possible to ping a role in an embed ? If yes how can I do it ?
2 Answers
Reset to default 2To ping a role by its ID, you can use <@&652878254927249420>
. There is an extra ampersand (&
) after the at (@
).
You can use it in embeds, but mentions won't work in the title, author, or footer, only inside setDescription
and addField
's value.
If you have a role object like this, you can simply mention it using template literals:
const role = message.guild.roles.cache.get('652878254927249420');
message.channel.send(`I'm mentioning ${role}, ehh`);
Simply use the Role#ToString method.
message.guild.roles.cache.get("652878254927249420").toString();