Moderation
mute
$mute
Mutes a user on the server.
Syntax
$mute[userID;(reason)]
$mute
The function $mute mutes a user on the Discord server. This prevents them from speaking in voice channels. The bot must have the MuteMembers permission.
Syntax
$mute[userID;(reason)]
Parameters
| Parameter | Description |
|---|---|
userID |
The ID of the user to mute. Required. |
reason |
Optional. The reason for the mute. |
Return Value
None. The user is muted.
Examples
Simple Mute
$mute[$mentioned[1];Spam vocal]
$sendMessage[<@$mentioned[1]> was muted for voice spam.]
Mute with moderation command
$if[$argsCount<1]
$sendMessage[Usage: !mute <@mention> <reason>]
$stop
$endif
$mute[$mentioned[1];$replaceText[$message;-;$mentioned[1];]]
$sendMessage[🔇 <@$mentioned[1]> is now muted.]
Verification before mute
$if[$isAdmin==true]
$mute[$mentioned[1];Violation of voice rules]
$sendMessage[Member muted.]
$else
$sendMessage[Permission denied.]
$endif
Notes
- The bot must have the
MuteMemberspermission. - The mute prevents users from speaking in voice channels, not from writing in text channels.
- To prevent sending messages, create a role without write permissions and use
$giveRole. - To unmute the user, use
$unmute. - For a temporary timeout, use
$timeout.