mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat(Collector): add idle time for a Collector to stop itself (#2942)
* Implement idle feature * Add typings * Minimal fixes * Make everything in Collector and not attached to ReactionCollector * set this._idletimeout to null when collector ends * also set this._timeout to null when collector ends
This commit is contained in:
committed by
SpaceEEC
parent
adb082305d
commit
f1433a2d97
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -350,6 +350,7 @@ declare module 'discord.js' {
|
||||
export abstract class Collector<K, V> extends EventEmitter {
|
||||
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
|
||||
private _timeout: NodeJS.Timer | null;
|
||||
private _idletimeout: NodeJS.Timer | null;
|
||||
|
||||
public readonly client: Client;
|
||||
public collected: Collection<K, V>;
|
||||
@@ -1759,6 +1760,7 @@ declare module 'discord.js' {
|
||||
|
||||
interface CollectorOptions {
|
||||
time?: number;
|
||||
idle?: number;
|
||||
dispose?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user