mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 17:21:31 +00:00
add valueOf method to permissions (#2363)
This commit is contained in:
parent
464fc14edd
commit
2a9fdef9e5
1 changed files with 4 additions and 0 deletions
|
|
@ -102,6 +102,10 @@ class Permissions {
|
||||||
return Object.keys(this.constructor.FLAGS).filter(perm => this.has(perm, checkAdmin));
|
return Object.keys(this.constructor.FLAGS).filter(perm => this.has(perm, checkAdmin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
valueOf() {
|
||||||
|
return this.bitfield;
|
||||||
|
}
|
||||||
|
|
||||||
*[Symbol.iterator]() {
|
*[Symbol.iterator]() {
|
||||||
const keys = this.toArray();
|
const keys = this.toArray();
|
||||||
while (keys.length) yield keys.shift();
|
while (keys.length) yield keys.shift();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue