mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
leftover _new perms
This commit is contained in:
+1
-3
@@ -10,9 +10,7 @@ export interface RoleData {
|
||||
/** position of this role */
|
||||
position: number;
|
||||
/** permission bit set */
|
||||
permissions: number;
|
||||
/** permission bit set */
|
||||
permissions_new: string;
|
||||
permissions: string;
|
||||
/** whether this role is managed by an integration */
|
||||
managed: boolean;
|
||||
/** whether this role is mentionable */
|
||||
|
||||
@@ -33,7 +33,7 @@ export function memberHasPermission(
|
||||
if (memberID === guild.ownerID) return true;
|
||||
|
||||
const permissionBits = memberRoleIDs.map((id) =>
|
||||
guild.roles.get(id)?.permissions_new
|
||||
guild.roles.get(id)?.permissions
|
||||
)
|
||||
.reduce((bits, permissions) => {
|
||||
bits |= BigInt(permissions);
|
||||
@@ -60,7 +60,7 @@ export async function botHasPermission(
|
||||
const permissionBits = member.roles
|
||||
.map((id) => guild.roles.get(id)!)
|
||||
.reduce((bits, data) => {
|
||||
bits |= BigInt(data.permissions_new);
|
||||
bits |= BigInt(data.permissions);
|
||||
|
||||
return bits;
|
||||
}, BigInt(0));
|
||||
|
||||
Reference in New Issue
Block a user