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

158
Views
Desbaneo de miembros en eventos desde el servidor de Discord

Hice el evento guildBanAdd para desbanear identificaciones específicas, pero quiero que deshabilite solo aquellas identificaciones que fueron prohibidas, porque para las identificaciones que no fueron prohibidas recibo el error de una prohibición desconocida.

 const cool = ['607868627181502467', '638038115277340723', '347651751651966978']; const { Client, guild, Message } = require('discord.js'); module.exports = { name: 'guildBanAdd', execute(message, guild, member, client) { cool.forEach((fB) => { message.guild.members.unban(fB); }) } }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tal vez el simple hecho de verificar las prohibiciones del gremio ayude.

 const cool = ['607868627181502467', '638038115277340723', '347651751651966978'] module.exports = { name: 'guildBanAdd', async execute(message, guild, member, client) { const guildBans = await message.guild.bans.fetch() //await message.guild.fetchBans() on v12 cool.forEach((fB)=>{ if(guildBans.has(fB)) message.guild.members.unban(fB) }) } }

Documentos

Guild.bans : documentos para v13

Guild.fetchBans() : documentos para v12

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!