Permissions: Add some constants for all or no permissions
This commit is contained in:
parent
a8f8af92d3
commit
98de0c8ae7
@ -199,6 +199,12 @@ export class Permissions extends BitField {
|
|||||||
|
|
||||||
return new Permissions(permission);
|
return new Permissions(permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NONE: Permissions = new Permissions(0);
|
||||||
|
static ALL: Permissions = new Permissions(Object.values(Permissions.FLAGS).reduce(
|
||||||
|
(total, val) => total | val,
|
||||||
|
BigInt(0),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
const ALL_PERMISSIONS = Object.values(Permissions.FLAGS).reduce(
|
const ALL_PERMISSIONS = Object.values(Permissions.FLAGS).reduce(
|
||||||
|
|||||||
Reference in New Issue
Block a user