From 794c0e131d19865a215ff2e8e52c4d2adab7dc97 Mon Sep 17 00:00:00 2001 From: Will Nelson Date: Fri, 21 Apr 2017 16:56:23 -0700 Subject: [PATCH] how2docs (#1400) --- src/structures/MessageCollector.js | 3 ++- src/structures/ReactionCollector.js | 9 ++++++--- src/structures/interfaces/Collector.js | 23 +++++++++++++++-------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 548b16615..34bc6b3cc 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -27,8 +27,9 @@ class MessageCollector extends Collector { this.channel = channel; /** - * @type {number} received Total number of messages that were received in the + * Total number of messages that were received in the * channel during message collection. + * @type {number} */ this.received = 0; diff --git a/src/structures/ReactionCollector.js b/src/structures/ReactionCollector.js index dcbc6de33..44b38c685 100644 --- a/src/structures/ReactionCollector.js +++ b/src/structures/ReactionCollector.js @@ -23,17 +23,20 @@ class ReactionCollector extends Collector { super(message.client, filter, options); /** - * @type {Message} message The message. + * The message. + * @type {Message} */ this.message = message; /** - * @type {Collection} users Users which have reacted. + * Users which have reacted. + * @type {Collection} */ this.users = new Collection(); /** - * @type {number} total Total number of reactions collected. + * Total number of reactions collected. + * @type {number} */ this.total = 0; diff --git a/src/structures/interfaces/Collector.js b/src/structures/interfaces/Collector.js index 14acfd715..e43706c92 100644 --- a/src/structures/interfaces/Collector.js +++ b/src/structures/interfaces/Collector.js @@ -23,39 +23,46 @@ class Collector extends EventEmitter { super(); /** - * @type {Client} client The client. + * The client. + * @type {Client} */ this.client = client; /** - * @type {CollectorFilter} filter The filter applied to this collector. + * The filter applied to this collector. + * @type {CollectorFilter} */ this.filter = filter; /** - * @type {CollectorOptions} options The options of this collector. + * The options of this collector. + * @type {CollectorOptions} */ this.options = options; /** - * @type {Collection} collected The items collected by this collector. + * The items collected by this collector. + * @type {Collection} */ this.collected = new Collection(); /** - * @type {boolean} ended Whether this collector has finished collecting. + * Whether this collector has finished collecting. + * @type {boolean} */ this.ended = false; /** - * @type {?number} _timeout Timeout ID for cleanup. + * Timeout ID for cleanup. + * @type {?number} * @private */ this._timeout = null; /** - * @type {Function} listener Call this to handle an event as a collectable element. + * Call this to handle an event as a collectable element. * Accepts any event data as parameters. + * @type {Function} * @private */ this.listener = this._handle.bind(this); @@ -77,7 +84,7 @@ class Collector extends EventEmitter { * Emitted whenever an element is collected. * @event Collector#collect * @param {*} element The element that got collected. - * @param {Collector} collector The message collector. + * @param {Collector} collector The collector. */ this.emit('collect', collect.value, this);