$muteUser
Mutes or unmutes a user in a voice channel. This command allows you to temporarily prevent a user from speaking in voice channels.
Usage
$muteUser[userID (default = $authorID);mute (yes/no);reason (optional)]
Parameters:
userID
: The ID of the user you want to mute or unmute. Defaults to the author of the command if not specified (using$authorID
).mute
: Specify whether to mute or unmute the user. Useyes
to mute andno
to unmute.reason
: (Optional) The reason for the mute. This will typically be displayed in audit logs (if your bot logs these).
Example
Troubleshooting
If you encounter an error, ensure the bot has the necessary "Mute Members" permission. Also, the bot's role must be higher in the role hierarchy than the user being muted.
Related Functions
- Is Muted: Check if a user is currently muted.