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

386
Visualizações
Discord displays @deleted-role while the role is still avalible

I got this problem when the discord bot I write with discord.js shows a role as @deleted-role, The role itself is still available but the bot says deleted role. I tried to test it with another role same here are the images of the and the code:

if (message.content.includes("test"))
  return message.channel.send("<@&" + 855179067388461076 + "> why is that ");

The result

enter image description here

The role

enter image description here

Can you guys help me with this?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The problem is that you use an integer (855179067388461076) as a snowflake. It should be a string. As this number is greater than 53 bits (MAX_SAFE_INTEGER) JavaScript has difficulty interpreting it. It can only safely represent integers between -(253 - 1) and 253 - 1.

Max safe integer 9007199254740992
Your integer 855179067388461076
Your integer becomes 855179067388461000

And there is no role with the ID of 855179067388461000. To solve this, make sure you only use strings as snowflakes:

message.channel.send("<@&" + "855179067388461076" + "> why is that")

// OR
const roleId = "855179067388461076"
message.channel.send("<@&" + roleId + "> why is that")

console.log('<@&' + 855179067388461076 + '> why is that ')
// => <@&855179067388461000> why is that 

over 4 years ago · Santiago Trujillo 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