mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
fix(DiscordService): revert ownerid check
This commit is contained in:
parent
f5374c2e5b
commit
6e692826c0
1 changed files with 1 additions and 7 deletions
|
@ -124,19 +124,13 @@ class DiscordService extends Service {
|
|||
}
|
||||
}
|
||||
|
||||
if (!!guild.ownerid) {
|
||||
this.log.warn('Owner ID is null!', guild, gm)
|
||||
}
|
||||
|
||||
const isOwner = !!guild.ownerid && guild.ownerid === gm.user.id
|
||||
|
||||
const matchFor = permissionInt =>
|
||||
!!gm.rolesList
|
||||
.map(id => guildRoles.find(role => role.id === id))
|
||||
.filter(x => !!x)
|
||||
.find(role => (role.permissions & permissionInt) === permissionInt)
|
||||
|
||||
const isAdmin = isOwner || matchFor(0x00000008)
|
||||
const isAdmin = guild.ownerid === gm.user.id || matchFor(0x00000008)
|
||||
const canManageRoles = isAdmin || matchFor(0x10000000)
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue