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

367
Views
Cuando un usuario menciona al propietario, el bot debería decir que no tienes permiso.

Estoy tratando de hacerlo cuando se etiqueta a un usuario (por ejemplo, MyNameJeff#0001 ), el bot responderá automáticamente diciendo que no puedes mencionarlo y eliminar su mensaje.

Intenté buscar un evento que pudiera manejar esto, pero hasta ahora no he encontrado nada útil.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puedes comprobar si la colección message.mentions.users incluye el ID del propietario del gremio con el método has() . Un simple if (message.mentions.users.has(message.guild.ownerId)) funcionará para usted:

 client.on('messageCreate', async (message) => { if (message.author.bot) return; if (message.mentions.users.has(message.guild.ownerId)) { message.channel.send('You are not allowed to mention the owner!'); message.delete(); } });
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!