Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

[actions] moderateMuteUser

Thedark1337 edited this page Aug 31, 2016 · 3 revisions

moderateMuteUser(userID[, reason[, duration[, callback]]])

Mute an user. The bot needs to have manager permission or higher.


Parameters

userID number

The user's ID.

reason int (optional)

Reason for muting.

  • 1: Violating community rules (default)
  • 2: Verbal abuse
  • 3: Spamming or trolling
  • 4: Offensive language
  • 5: Negative attitude
duration string (optional)

Duration of mute.

  • s or PlugAPI.MUTE.SHORT: 15 minutes
  • m or PlugAPI.MUTE.MEDIUM : 30 minutes
  • l or PlugAPI.MUTE.LONG : 45 minutes (default)
callback function (optional)

Callback function to be called with data from server.


Returns

true if request queued; otherwise false


Example

// Mute user 'xxxxxx' for 45 minutes for violating community rules
bot.moderateMuteUser('xxxxxx');

// Mute user 'xxxxxx' for 15 minutes for spamming
bot.moderateMuteUser('xxxxxx', 3, PlugAPI.MUTE.SHORT);
Clone this wiki locally