Document readonly and private properties (#1338)

This commit is contained in:
SpaceEEC
2017-04-03 20:05:36 +02:00
committed by Crawl
parent 4be08406e6
commit ecb8655dac
12 changed files with 16 additions and 0 deletions

View File

@@ -306,6 +306,7 @@ class Guild {
* Fetches a collection of roles in the current guild sorted by position.
* @type {Collection<Snowflake, Role>}
* @readonly
* @private
*/
get _sortedRoles() {
return this._sortPositionWithID(this.roles);
@@ -963,6 +964,7 @@ class Guild {
* Fetches a collection of channels in the current guild sorted by position.
* @param {string} type Channel type
* @returns {Collection<Snowflake, GuildChannel>}
* @private
*/
_sortedChannels(type) {
return this._sortPositionWithID(this.channels.filter(c => {
@@ -977,6 +979,7 @@ class Guild {
* Intended to be identical to Discord's sorting method.
* @param {Collection} collection The collection to sort
* @returns {Collection}
* @private
*/
_sortPositionWithID(collection) {
return collection.sort((a, b) =>