mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(Collector): docs and types (#5937)
This commit is contained in:
@@ -95,7 +95,7 @@ class Collector extends EventEmitter {
|
||||
* @emits Collector#collect
|
||||
*/
|
||||
async handleCollect(...args) {
|
||||
const collect = this.collect(...args);
|
||||
const collect = await this.collect(...args);
|
||||
|
||||
if (collect && (await this.filter(...args, this.collected))) {
|
||||
this.collected.set(collect, args[0]);
|
||||
@@ -269,7 +269,7 @@ class Collector extends EventEmitter {
|
||||
* be collected, or returns an object describing the data that should be stored.
|
||||
* @see Collector#handleCollect
|
||||
* @param {...*} args Any args the event listener emits
|
||||
* @returns {?{key, value}} Data to insert into collection, if any
|
||||
* @returns {?(*|Promise<?*>)} Data to insert into collection, if any
|
||||
* @abstract
|
||||
*/
|
||||
collect() {}
|
||||
|
||||
Reference in New Issue
Block a user