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

133
Views
Quiero hacer un comando en la lista blanca usando quick.db

Quiero hacer un comando de lista blanca usando QuickDB, de modo que si lo hago

!lista blanca @usuario/idusuario

Luego almacena datos en la base de datos.

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

0

Tenga en cuenta: esta plataforma es para ayudarlo con su código / errores que enfrenta y no para alimentarlo con cuchara.

Ahora yendo a tu pregunta

 const db = require('quick.db') client.on("messageCreate", async message => { if (message.content.startsWith('!blacklist')) { let mentions = message.mentions.users.first() if (!mentions) { return message.reply({ content: `Please mention a user!` }) } else { await db.push(`_blacklisted_`, mentions.id)//Including the mentioned member into the blacklisted list message.channel.send({ content: `Blacklisted **${mentions.tag}**` }) } } if (message.content.startsWith('!whitelist')) { let mentions = message.mentions.users.first() if (!mentions) { return message.reply({ content: `Please mention a user!` }) } else { let check_blacklist = await db.get(`_blacklisted_`, []) let index = check_blacklist.indexOf(mentions.id) if (index > -1) { check_blacklist.splice(index, 1)//remove the mentioned user from the blacklisted array await db.set(`_blacklisted_`, check_blacklist) //Setting the new list message.reply({ content: `Whitelisted ${mentions.tag}` }) } else { message.reply({ content: `${mentions.username} is not blacklisted` }) } } } })

Lee los documentos

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!