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

628
Views
RangeError [BITFIELD_INVALID]: Indicador o número de campo de bits no válido: 3214336

Estoy tratando de hacer un Tablero de Discord, pero recibo un error extraño: indicador de campo de bits no válido o número 3214336. Esto sucede cuando intento obtener los gremios que el usuario tiene MANAGE_GUILDS, mi código es:

 <%- include("../Includes/header", { bot, path, user, Discord, title: 'Dashboard' }) %> <div class="content"> <h2>SELECT A SERVER</h2> <div class="servers"> <% user.guilds.forEach(guild => { const permsOnGuild = new Discord.Permissions(guild); if(!permsOnGuild.has("MANAGE_GUILD")) { return } if (!bot.guilds.cache.get(guild.id)) { return } if (guild.icon) { iconurl = "https://cdn.discordapp.com/icons/" + guild.id + "/" + guild.icon + ".png??size=512"; } else { iconurl = "https://cdn.glitch.com/82fe990a-7942-42e3-9790-39807ccdb9f6%2Ficon-404-dark.png?v=1602427904949"; } %> <div class="server"> <div class="icon-and-name"> <img class="server-icon" src="<%= iconurl %>" alt="<% guild.name %>"/> <p class="guild-name"><%= guild.name %></p> </div> <% if (bot.guilds.cache.get(guild.id)) { %> <a class="edit button" href="/redeem/<%= guild.id %>">Redeem</a> <% } %> </div> <% }); %> </div> <script> function PopupCenter(e, n, t, i) { var o = void 0 != window.screenLeft ? window.screenLeft : screen.left, d = void 0 != window.screenTop ? window.screenTop : screen.top, c = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width, w = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height, r = c / 2 - t / 2 + o, h = w / 2 - i / 2 + d, s = window.open(e, n, "scrollbars=yes, width=" + t + ", height=" + i + ", top=" + h + ", left=" + r); window.focus && s.focus() } </script>

No sé por qué sucede esto, si registro "gremio" puedo obtener acceso a la identificación, el nombre, el ícono, el propietario, los permisos, las funciones y los permisos_nuevo

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

0

Trata de hacerlo

 let permsOnGuild = new Discord.Permissions(BigInt(guild.permissions)); if (! permsOnGuild.has(Discord.Permissions.FLAGS.MANAGE_GUILD)) return;
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!