cmd.user.untimeout
Removes an active timeout from a guild member, restoring their ability to send messages and join voice channels.
JavaScript
const { cmd } = require("syntx.js");
await cmd.user.untimeout({ user, reason }, message);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
user | string | Yes | The ID of the member to remove the timeout from. |
reason | string | No | Audit log reason for removing the timeout. |
message | discord.js Message | Interaction | Yes | A guild message or interaction, used to access the guild. |
Returns
This function does not return a value.
Example
JavaScript
client.command({
name: "untimeout",
content: async (message) => {
const id = cmd.message.mentioned(message, 1);
if (!id) return message.reply("Please mention a user.");
await cmd.user.untimeout(
{
user: id,
reason: "Timeout removed by moderator",
},
message
);
message.reply(`<@${id}>'s timeout has been removed.`);
},
});Warning
The bot must have the Moderate Members permission, and its highest role must be above the target's highest role. If the member is not found in the guild, a SyntxError is thrown.