Discord.js - Ping a Role using Role ID

Viewed 18801

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?

4 Answers

To ping a role you will need <@&"roleID">

Type <@&(role id here)> and it will work.

All you need to do is use <@&[roleid]>.

Example:

<@&757133230280409177>

try to put @ outside of <>, mayby it will work

Related