Discord.js - Ping a Role using Role ID
15,025
Solution 1
To ping a role you will need <@&"roleID">
Solution 2
Type <@&(role id here)>
and it will work.
Solution 3
All you need to do is use <@&[roleid]>.
Example:
<@&757133230280409177>
Related videos on Youtube
Author by
Ryan
Updated on June 04, 2022Comments
-
Ryan about 2 years
I want to ping a role using ID, so far i have tried this:
function prayer() { let myChannel = 'channel ID' client.channels.cache.get(myChannel).send("Mentioning. <@707335030002942033>"); }
But all it does it print the <@707335030002942033> and not the role itself. Is this command deprecated?