Add Guild.defaultChannel. (#646)

* Add Guild.defaultChannel. Closes #643.

* Change defaultChannel to a getter.
This commit is contained in:
Kelvin Wu
2016-09-07 15:58:18 -04:00
committed by Schuyler Cebulskie
parent 31bdc4fb1e
commit 9bdf670a14
2 changed files with 10 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -226,6 +226,15 @@ class Guild {
return this.members.get(this.ownerID);
}
/**
* The `#general` GuildChannel of the server.
* @type {GuildChannel}
* @readonly
*/
get defaultChannel() {
return this.channels.get(this.id);
}
/**
* Updates the Guild with new information - e.g. a new name.
* @param {GuildEditData} data The data to update the guild with