mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
add .toObject() method to structures (#522)
* add .toObject() method to structures * add compiled PMChannel change from last commit * uncomment members in VoiceChannel toObject method
This commit is contained in:
@@ -43,6 +43,17 @@ export default class PermissionOverwrite {
|
||||
return denied;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
let keys = ['id', 'type', 'allow', 'deny'],
|
||||
obj = {};
|
||||
|
||||
for (let k of keys) {
|
||||
obj[k] = this[k];
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
setAllowed(allowedArray){
|
||||
allowedArray.forEach( (permission) => {
|
||||
if(permission instanceof String || typeof permission === "string"){
|
||||
|
||||
Reference in New Issue
Block a user