Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
Discord.js not sending message for a specific role

I'm making a system for a position, where you get an achievement for a position, I want to warn such a user that when he wins the position he won the achievement, but I don't know how to do it, so I improvised the command below!

const client = require("../index.js")
const wait = require('util').promisify(setTimeout);
client.on('messageCreate', async message => {
  const member = await message.guild.members.fetch({
    user: message.user.id,
    force: true 
  })
    var canal = message.guild.channels.cache.find(ch => ch.id === "980553632116269080");
  
   if(!member.roles.cache.has("980553630782464068")) { 
     await member.roles.cache.get("980553630782464068")
      return message.member.send(`${client.emoji.success} We Have Added PlayStation Role`)
}
})

I want him to be like this https://i.stack.imgur.com/ocALk.jpg

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!