mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 04:12:50 +02:00
Fix calls to syncUser/registerUser
This commit is contained in:
parent
043f178d1e
commit
0f1cf7a20c
4 changed files with 17 additions and 11 deletions
|
@ -63,7 +63,7 @@ function getPermissions(userRoles, guildRoles, userID, channelOverwrites) {
|
|||
*/
|
||||
function hasPermission(resolvedPermissions, permissionToCheckFor) {
|
||||
// Make sure permissionToCheckFor has exactly one permission in it
|
||||
assert.equal(permissionToCheckFor.toString(2).match(/1/g), 1)
|
||||
assert.equal(permissionToCheckFor.toString(2).match(/1/g)?.length, 1)
|
||||
// Do the actual calculation
|
||||
return (resolvedPermissions & permissionToCheckFor) === permissionToCheckFor
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue