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

118
Views
Not sending image for a specific role | Discord.js and canvas

I don't know how to describe this problem, but I just know that it doesn't work on canvas when I want an image for a specific role:

if (interaction.member.roles.cache.has('980553630782464068') === user.id) list2.push("MODERATOR");
          .replace("MODERATOR", "Moderator", user.id)

It turns out that the image does not appear on the canvas, and this error has been happening for a long time.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Assuming interaction is an Interaction, interaction.member.roles.cache.has() returns a boolean, and user.id is a Snowflake, so they're never going to be strictly equal (since === always returns false for two arguments of differing types), and thus the if statement will never execute the code within it.

if (interaction.member.roles.cache.has('980553630782464068')) is probably what you're looking for, that checks if the person who caused interaction has the role with the id 980553630782464068.

about 4 years ago · Juan Pablo Isaza Report
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!