I’m making a simple timeout bot, the code in question is the following:
mentioned.roles.add(role);
mentioned.voice.setMute(true, `Time-out for ${duration}`);
msg.channel.send(`Timed-out <@${mentioned.id}> for ${duration}`);
console.log("Timed-out", mentioned.displayName, "for", duration);
scheduler.schedule(mentioned.id, parsedDuration, () => {
mentioned.roles.remove(role);
mentioned.voice.setMute(false, "Time-out ended");
msg.channel.send(`Time-out ended for <@${mentioned.id}>`);
console.log("Time-out ended for", mentioned.displayName);
});
}
This works fine, but after being timed-out some members are telling me they’re getting an error when sending messages that links them to this support page.
You’re only supposed to get this error on DMs, and they’re consistently getting it after being timed out.
Why is this happening?