DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
Functions
Action
Compacts
Conditions
$and
$botInGuild
$channelExists
$checkChars
$checkCondition
$checkContains
$containsCheck
$containsCustomEmoji
$containsEmoji
$customCommandExists
$enabled
$endsWith
$hasAnyRole
$hasPerm
$hasRole
$hasRoles
$hasAttachment
$isBoolean
$isBoosting
$isBanned
$isBot
$isCategory
$isCustomEmoji
$isEmbed
$isEmoji
$isEveryoneMentioned
$If
$isGuildVerified
$isHereMentioned
$isHoisted
$isMentionable
$isNegativeNumber
$isNSFW
$isNumber
$isPinned
$isString
$isUserDMEnabled
$isUserInGuild
$isValidHex
$isValidImageURL
$isValidInvite
$isValidURL
$memberExists
$messageExists
$numberHasDecimal
$or
$roleExists
$userExists
Data
Embeds
Limiters
Music
Variables
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
$hasRoles
Returns `true` if the user has all the role(s) in the defined guild. Otherwise the function returns `false`.
FUNCTION USAGE:
$hasRoles[userID;guildID;roleID]
$hasRoles[userID;guildID;roleID;roleID;etc...]
​
Properties:
userID
- The user being checked.
guildID
- The guild where the user and role is being checked.
roleID
- The role(s) being checked.
​
Example:
bot.Command({
name: "check",
code: `
$hasRoles[$authorID;$guilID[DB-Script Official Server];3546345634563456;23423542346322562;586784673546325463]
`
})
Previous
$hasRole
Next
$hasAttachment
Last modified
1yr ago
Copy link