Search code examples
discord.js

Discord.js - Ping a Role using Role ID


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?


Solution

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