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

181
Views
La función de prohibición del token de Discord.JS no funciona correctamente al intentar ejecutar el comando en la terminal

Ok, entonces estaba tratando de crear un bot de discord, con comandos de prohibición, pero luego sucedió esto

https://i.stack.imgur.com/ogAHf.png

Aquí está mi código

https://i.stack.imgur.com/5ceGo.png

¿Cómo puedo solucionar esto?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debería ser:

 module.exports = { name: 'ban', description: "This command bans people", execute(message, args) { if(message.member.roles.cache.has('923203237019004958')) { const member = message.mentions.members.first(); if(member) { const memberTarger = message.guild.members.cache.get(member.id); memberTarger.ban(); message.channel.send("User has been banned from the paper bag"); } else { message.channel.send("You don't have the sufficent permissions to run this command") } } } }

Había un corchete de cierre } al lado de execute(message, args) pero debería ser un corchete de apertura {

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