mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 12:11:11 +00:00
Preparing Channel class for overwrite capability
This commit is contained in:
parent
e046467d92
commit
6d36977f94
2 changed files with 20 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ var Channel = (function () {
|
||||||
this.topic = data.topic;
|
this.topic = data.topic;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.messages = [];
|
this.messages = [];
|
||||||
|
this.roles = [];
|
||||||
//this.isPrivate = isPrivate; //not sure about the implementation of this...
|
//this.isPrivate = isPrivate; //not sure about the implementation of this...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,6 +74,16 @@ var Channel = (function () {
|
||||||
value: function toString() {
|
value: function toString() {
|
||||||
return "<#" + this.id + ">";
|
return "<#" + this.id + ">";
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "permissionOverwrites",
|
||||||
|
get: function get() {
|
||||||
|
return this.roles;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "permissions",
|
||||||
|
get: function get() {
|
||||||
|
return this.roles;
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "client",
|
key: "client",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,17 @@ class Channel {
|
||||||
this.topic = data.topic;
|
this.topic = data.topic;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.messages = [];
|
this.messages = [];
|
||||||
|
this.roles = [];
|
||||||
//this.isPrivate = isPrivate; //not sure about the implementation of this...
|
//this.isPrivate = isPrivate; //not sure about the implementation of this...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get permissionOverwrites(){
|
||||||
|
return this.roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
get permissions(){
|
||||||
|
return this.roles;
|
||||||
|
}
|
||||||
|
|
||||||
get client() {
|
get client() {
|
||||||
return this.server.client;
|
return this.server.client;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue