$hasAnyRole
Checks if the user has any one of the defined roles in the check. Returns `true` if the user has at least one role. Returns `false` if the user doesn't have any of them.

FUNCTION USAGE

  • $hasAnyRole[userID;roleID;roleID;...etc]

Properties:

userID - Define the user with thier ID roleID - Define the roleID(s) for checking if the user has.
Example 1: Checks if the mentioned user has any of the two roles.
1
bot.Command({
2
name: "check",
3
code: `
4
$hasAnyRole[$mentioned[1;yes];45645653453456345;17619836459136454]
5
`
6
})
Copied!
Example 2: Check of the user has any of the roles defined in the command.
1
bot.Command({
2
name: "check",
3
code: `
4
$hasAnyRole[$findUser[$message[1]];$message[2];$message[3]]
5
`
6
})
Copied!
Last modified 9mo ago
Copy link
Contents
Properties: