mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
add valueOf method to permissions (#2363)
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user