mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 12:20:23 +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));
|
||||
}
|
||||
|
||||
valueOf() {
|
||||
return this.bitfield;
|
||||
}
|
||||
|
||||
*[Symbol.iterator]() {
|
||||
const keys = this.toArray();
|
||||
while (keys.length) yield keys.shift();
|
||||
|
|
|
|||
Loading…
Reference in a new issue