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

131
Views
¿Cómo puedo poner 2 ID de discordia dentro de una declaración if (mensaje.autor.id! =)

Hola, he estado tratando de ejecutar este código e intenté recodificarlo varias veces, pero cada vez que trato de poner 2 ID dentro del if (mensaje.autor.id! = ID de propietario) devuelve el mensaje. acceso a este comando"); solo registra 1 de las identificaciones aquí está mi código actual:

 client.on('message', message => { if (message.content === prefix + 'listservers') { if(message.author.id != ownerid && altid) return message.channel.send("You don't have access to this command"); //rest of the code }})
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tienes algunas opciones diferentes. Así es como lo haría, usando una matriz y Array.includes() :

 const allowedUsers = ["user id 1", "user id 2"] client.on('message', message => { if (message.content === prefix + 'listservers') { if(!allowedUsers.includes(message.author.id)) return message.channel.send("You don't have access to this command"); //rest of the code }})
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!