Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda