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 of this role */
|
||||||
position: number;
|
position: number;
|
||||||
/** permission bit set */
|
/** permission bit set */
|
||||||
permissions: number;
|
permissions: string;
|
||||||
/** permission bit set */
|
|
||||||
permissions_new: string;
|
|
||||||
/** whether this role is managed by an integration */
|
/** whether this role is managed by an integration */
|
||||||
managed: boolean;
|
managed: boolean;
|
||||||
/** whether this role is mentionable */
|
/** whether this role is mentionable */
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function memberHasPermission(
|
|||||||
if (memberID === guild.ownerID) return true;
|
if (memberID === guild.ownerID) return true;
|
||||||
|
|
||||||
const permissionBits = memberRoleIDs.map((id) =>
|
const permissionBits = memberRoleIDs.map((id) =>
|
||||||
guild.roles.get(id)?.permissions_new
|
guild.roles.get(id)?.permissions
|
||||||
)
|
)
|
||||||
.reduce((bits, permissions) => {
|
.reduce((bits, permissions) => {
|
||||||
bits |= BigInt(permissions);
|
bits |= BigInt(permissions);
|
||||||
@@ -60,7 +60,7 @@ export async function botHasPermission(
|
|||||||
const permissionBits = member.roles
|
const permissionBits = member.roles
|
||||||
.map((id) => guild.roles.get(id)!)
|
.map((id) => guild.roles.get(id)!)
|
||||||
.reduce((bits, data) => {
|
.reduce((bits, data) => {
|
||||||
bits |= BigInt(data.permissions_new);
|
bits |= BigInt(data.permissions);
|
||||||
|
|
||||||
return bits;
|
return bits;
|
||||||
}, BigInt(0));
|
}, BigInt(0));
|
||||||
|
|||||||
Reference in New Issue
Block a user