Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

377
Visualizações
When a user mentions the owner the bot should say you're not allowed

I am trying to make it when a user is tagged (eg. MyNameJeff#0001), the bot will automatically respond with you're not allowed to mention them and delete their message.

I tried searching for an event that could handle this but haven't found anything useful so far.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can check if the collection message.mentions.users includes the guild owner's ID with the has() method. A simple if (message.mentions.users.has(message.guild.ownerId)) will work for you:

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda