You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bans an user from the room.
The bot needs to have bouncer permission or higher.
Parameters
userID number
The user's ID.
reason int (optional)
Reason for ban.
1: Spamming or trolling (default)
2: Verbal abuse or offensive language
3: Playing offensive videos/songs
4: Repeatedly playing inappropriate genre(s)
5: Negative attitude
duration string (optional)
Duration of ban.
horPlugAPI.BAN.HOUR: Hour
dorPlugAPI.BAN.DAY : Day
forPlugAPI.BAN.PERMA : Forever (default)
callback function (optional)
Callback function to be called with data from server.
Returns
true if request queued; otherwise false
Example
// Require PlugAPIvarPlugAPI=require('plugapi');// Ban user forever for spamming or trollingbot.moderateBanUser('xxxxxxxxxxxxxxxxxxxxxxxx');// Ban user for a day for negative attitudebot.moderateBanUser('xxxxxxxxxxxxxxxxxxxxxxxx',4,PlugAPI.BAN.DAY);