$hasRole
If the user has the role in the defined guild, function returns `true`. Otherwise the function return `false`.

FUNCTION USAGE

    $hasRole[roleID]
    $hasRole[roleID;userID]
    $hasRole[roleID;userID;guildID]

Properties:

userID - The user being checked. roleID - The role being checked. guildID - The guild where the user and role is being checked.
Example 1: Returns true if you have the Admin role. Else, it will return false
1
bot.Command({
2
name: "check",
3
code: `
4
$hasRole[$authorID;$roleID[Admin]]
5
`
6
})
Copied!

Example 2: Returns undefined if the role does not exist or is simply not a role.

1
bot.Command({
2
name: "check",
3
code: `
4
$hasRole[$authorID;$roleID[Admin]]
5
`
6
})
Copied!
Last modified 3mo ago
Copy link
Contents
Properties: