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

235
Visualizações
How to use setMute() in Discord.js

Tried searching about mute commands, but they were all role based and as I understand setMute is what i need. Which is to mute a specific member without having to mess with any roles, just can't figure how to use the command as anything i try it's either not a function or something is undefined. This is what i have now

let person = message.Client.users.fetch('id');
    let reason = ''
    person.then(function(personuser) {

            personuser.setMute(true, reason);
    }); 
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

To mute someone, fetch him as a "Guild Member", not "User".

message.guild?.members.fetch("userid").then(member => {
    const reason = "reason"
    member.voice.setMute(true, reason);
})
about 4 years ago · Juan Pablo Isaza Relatório

0

If you don't want roles, you can just use time out.

const member = await message.guild.members.fetch(message.author.id);
const time = 60; // Duration for timeout in milliseconds
const reason = 'Deserved it?' // reason for timeout if you have one
await member.timeout(time, reason);

timeouts are handy. u dont have to keep a db for finding out when to unmute/remove role from a user. discord does it for you.

about 4 years ago · Juan Pablo Isaza 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