mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ChannelPermissions works generically
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class Channel {
|
||||
|
||||
for (var role of data.permission_overwrites) {
|
||||
|
||||
this.roles.push( new ChannelPermissions() );
|
||||
this.roles.push( new ChannelPermissions(role) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user