ChannelPermissions works generically

This commit is contained in:
hydrabolt
2015-10-03 20:45:04 +01:00
parent 6b091128cb
commit 2ededd61dd
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,14 @@
class ChannelPermissions{
constructor(data){
this.type = data.type; //either member or role
this.id = data.id;
this.deny = data.deny;
this.allow = data.allow;
}
}

View File

@@ -13,7 +13,7 @@ class Channel {
for (var role of data.permission_overwrites) {
this.roles.push( new ChannelPermissions() );
this.roles.push( new ChannelPermissions(role) );
}