#Check if a member is already on timeout
15 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
Were they timed out previously?
No, they've only just been muted
and it says 'User already muted' while they are not
const member = await interaction.options.getMember('user');
const time = await interaction.options.getString('time');
const muteTime = ms(time);
if(muteTime === undefined) return interaction.reply({ content: 'Invalid Time' })
await member.timeout(muteTime);
if(member.isCommunicationDisabled() === true) return interaction.reply ('User already muted')
this is the full ish part
So you time them out. And then you check to see if they’re timed out.?
?? that doesn't make sense
how so?
if you put them on timeout, then check if they're on timeout, that if statement will always be true
You may want to check before timing them out
i'm gonna be amazed if i'm actually that dumb..
Check if a member is already on timeout