Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

129
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda