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

[actions] moderateSetRole

Thedark1337 edited this page Aug 31, 2016 · 2 revisions

moderateSetRole(userID, role[, callback])

Set a role to an user. The bot needs to have manager permission or higher.


Parameters

userID number

The user's ID.

role int
  • 0 or PlugAPI.ROOM_ROLE.NONE : None
  • 1 or PlugAPI.ROOM_ROLE.RESIDENTDJ : Resident DJ
  • 2 or PlugAPI.ROOM_ROLE.BOUNCER : Bouncer
  • 3 or PlugAPI.ROOM_ROLE.MANAGER : Manager
  • 4 or PlugAPI.ROOM_ROLE.COHOST : Co-Host
  • 5 or PlugAPI.ROOM_ROLE.HOST : Host
callback function (optional)

Callback function to be called with data from server.


Returns

true if request queued; otherwise false


Example

// Make normal user 'xxxxxx' Resident DJ
bot.moderateSetRole('xxxxxx', 1);

// Make bouncer 'xxxxxx' normal user again
bot.moderateSetRole('xxxxxx', PlugAPI.ROOM_ROLE.NONE);
Clone this wiki locally