$takeRole
Removes the defined role from a member of the defined guild. 4th field sets a reason and will be audited.

FUNCTION USAGE

    $takeRole[roleID]
    $takeRole[roleID;userID]
    $takeRole[roleID;userID;guildID]
    $takeRole[roleID;userID;guildID;reason]

Properties:

roleID - The ID of the role to remove from the user. userID - The ID of the user to remove the role from. Defaults to command author. guildID - The ID of the guild where the user and role is located. Defaults to current guild. reason - The reason for removing the role. Audits the reason. May be optional.
The bot must have manage roles permissions and a role above given user's highest role.
Example 1: $takeRole[roleID] - Removes a role from the command user.
1
bot.Command({
2
name: "role-remove",
3
code: `
4
$takeRole[27459792374634564]
5
:white_check_mark: | Removed the <@&27459792374634564]> role from $tag[$authorID]
6
`
7
})
Copied!
Example 2: $takeRole[roleID;userID] - Removes a role from a guild member.
1
bot.Command({
2
name: "role-remove",
3
code: `
4
$takeRole[SomeRandomRoleIDHere;$mentioned[1]]
5
:white_check_mark: | Removed <@&message[2]> role from $tag[$mentioned[1]]!
6
`
7
})
Copied!
Example 3: $takeRole[roleID;userID;reason] - Removes a role from a guild member with audited reason.
1
bot.Command({
2
name: "role-remove",
3
code: `
4
$takeRole[SomeRandomRoleIDHere;$mentioned[1];$messageSlice[>2]]
5
:white_check_mark: | Removed <@&message[2]> role from $tag[$mentioned[1]]!
6
Reason: *$messageSlice[>2]*
7
`
8
})
Copied!
Last modified 3mo ago
Copy link
Contents
Properties: