Difference between revisions of "Bot Playground/Commands/revokeGroupRole"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Revokes a specific role from a group member.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.revokeGroupRole(avatar_uuid,...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
<onlyinclude>Revokes a specific role from a group member.</onlyinclude>
+
<onlyinclude>Removes a group member from a specific role.</onlyinclude> Also see a [[Bot Playground/Commands/setGroupRole|setGroupRole]] function.
  
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
Line 21: Line 21:
  
 
{{API Variables Table End}}
 
{{API Variables Table End}}
 +
 +
== Comments ==
 +
 +
Make sure your bot has sufficient rights to assign/revoke members from group roles.
  
 
{{NavMenu}}
 
{{NavMenu}}
 
__NOTOC__
 
__NOTOC__

Revision as of 20:55, 31 October 2016

Removes a group member from a specific role. Also see a setGroupRole function.

Bot.revokeGroupRole(avatar_uuid, group_uuid, role_uuid)
  .then(function(result) {
    if(result.success) { console.log("Role revoked"); }
  });

Reference

This command accepts the following parameters:

Variable Required Description


Input:
avatar_uuid yes The UUID of the avatar which should be removed from the role
group_uuid yes The UUID of the group
role_uuid yes The UUID of the group role.
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed

Comments

Make sure your bot has sufficient rights to assign/revoke members from group roles.