Move and document GuildChannel.guild (#613)

This commit is contained in:
Schuyler Cebulskie
2016-09-06 16:45:09 -04:00
committed by GitHub
parent 943767dc83
commit 910f47240d
3 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
* Represents any Channel on Discord * Represents any Channel on Discord
*/ */
class Channel { class Channel {
constructor(client, data, guild) { constructor(client, data) {
/** /**
* The client that instantiated the Channel * The client that instantiated the Channel
* @type {Client} * @type {Client}
@@ -10,7 +10,6 @@ class Channel {
this.client = client; this.client = client;
this.typingMap = {}; this.typingMap = {};
this.typingTimeouts = []; this.typingTimeouts = [];
if (guild) this.guild = guild;
/** /**
* The type of the channel, either: * The type of the channel, either:
* * `dm` - a DM channel * * `dm` - a DM channel

View File

@@ -12,7 +12,12 @@ const arraysEqual = require('../util/ArraysEqual');
*/ */
class GuildChannel extends Channel { class GuildChannel extends Channel {
constructor(guild, data) { constructor(guild, data) {
super(guild.client, data, guild); super(guild.client, data);
/**
* The guild the channel is in
* @type {Guild}
*/
this.guild = guild;
} }
setup(data) { setup(data) {