diff --git a/src/client/Client.js b/src/client/Client.js index 3e3a32172..c19c01e67 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -340,7 +340,7 @@ class Client extends EventEmitter { * Sets a timeout that will be automatically cancelled if the client is destroyed. * @param {function} fn Function to execute * @param {number} delay Time to wait before executing (in milliseconds) - * @param {args} args Arguments for the function (not an array, but an infinite argument) + * @param {args} args Arguments for the function (infinite/rest argument, not an array) * @returns {Timeout} */ setTimeout(fn, delay, ...args) { @@ -365,7 +365,7 @@ class Client extends EventEmitter { * Sets an interval that will be automatically cancelled if the client is destroyed. * @param {function} fn Function to execute * @param {number} delay Time to wait before executing (in milliseconds) - * @param {args} args Arguments for the function (not an array, but an infinite argument) + * @param {args} args Arguments for the function (infinite/rest argument, not an array) * @returns {Timeout} */ setInterval(fn, delay, ...args) { diff --git a/src/util/Collection.js b/src/util/Collection.js index 53299023a..7dc8a10da 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -125,6 +125,8 @@ class Collection extends Map { * Returns a single item where `item[prop] === value`, or the given function returns `true`. * In the latter case, this is identical to * [Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + * Do not use this to obtain an item by its ID. Instead, use `collection.get(id)`. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) for details. * @param {string|function} propOrFn The property to test against, or the function to test with * @param {*} [value] The expected value - only applicable and required if using a property for the first argument * @returns {*} @@ -183,6 +185,8 @@ class Collection extends Map { /** * Returns true if the collection has an item where `item[prop] === value` + * Do not use this to check for an item by its ID. Instead, use `collection.has(id)`. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) for details. * @param {string} prop The property to test against * @param {*} value The expected value * @returns {boolean} @@ -288,7 +292,7 @@ class Collection extends Map { /** * Combines this collection with others into a new collection. None of the source collections are modified. - * @param {Collection} collections Collections to merge + * @param {Collection} collections Collections to merge (infinite/rest argument, not an array) * @returns {Collection} * @example const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); */