From 6d36977f9433f432b319331d651ec975ae9e2365 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 3 Oct 2015 20:34:24 +0100 Subject: [PATCH] Preparing Channel class for overwrite capability --- lib/channel.js | 11 +++++++++++ src/channel.js | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/channel.js b/lib/channel.js index bb67fcf4f..1edec0f84 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -14,6 +14,7 @@ var Channel = (function () { this.topic = data.topic; this.id = data.id; this.messages = []; + this.roles = []; //this.isPrivate = isPrivate; //not sure about the implementation of this... } @@ -73,6 +74,16 @@ var Channel = (function () { value: function toString() { return "<#" + this.id + ">"; } + }, { + key: "permissionOverwrites", + get: function get() { + return this.roles; + } + }, { + key: "permissions", + get: function get() { + return this.roles; + } }, { key: "client", get: function get() { diff --git a/src/channel.js b/src/channel.js index a7185e17f..939b01e7c 100644 --- a/src/channel.js +++ b/src/channel.js @@ -7,8 +7,17 @@ class Channel { this.topic = data.topic; this.id = data.id; this.messages = []; + this.roles = []; //this.isPrivate = isPrivate; //not sure about the implementation of this... } + + get permissionOverwrites(){ + return this.roles; + } + + get permissions(){ + return this.roles; + } get client() { return this.server.client;