mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 08:41:29 +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{
|
class ChannelPermissions{
|
||||||
constructor(data){
|
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) {
|
for (var role of data.permission_overwrites) {
|
||||||
|
|
||||||
this.roles.push( new ChannelPermissions() );
|
this.roles.push( new ChannelPermissions(role) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue