mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
ChannelPermissions works generically
This commit is contained in:
parent
6b091128cb
commit
2ededd61dd
2 changed files with 9 additions and 1 deletions
|
|
@ -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) );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue