$takeRole

Deprecated

As of December 2021, this function has been deprecated in favor of $roleGrant[].

In order to remove a role from a user, the bot must have the manageroles permission.

Removes a role from the provided/mentioned user.

Syntax

$takeRole[User/Role ID;(Role ID)]

Parameters

  • User/Role ID (Type: Snowflake || Flag: Required): The user to remove the specified role from or the role to remove from the mentioned users. If only this parameter is provided, it will be read as “Role ID”.
  • Role ID (Type: Snowflake || Flag: Optional): The role to remove from the user. If this parameter is used, it reads the first parameter as “User ID”.

Examples

Example #1

$nomention $allowRoleMentions[] $takeRole[$mentionedRoles[1]] Removed <@&$mentionedRoles[1]> from the mentioned users!

example1

Example #2

$nomention $allowMention $allowRoleMentions[] $takeRole[$message[1];$mentionedRoles[1]] Removed the role <@&$mentionedRoles[1]> from <@$message[1]>!

example2
example2