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

229
Views
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 answers
Answer question

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 Report

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 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!