feat(Collector): add idle option (#3746)

This commit is contained in:
SpaceEEC
2020-02-01 18:23:57 +01:00
committed by GitHub
parent fbcd363ec9
commit ccd60438df
2 changed files with 28 additions and 3 deletions

8
typings/index.d.ts vendored
View File

@@ -362,7 +362,8 @@ declare module 'discord.js' {
abstract class Collector<K, V> extends EventEmitter {
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
private _timeout: NodeJS.Timer;
private _timeout: NodeJS.Timer | null;
private _idletimeout: NodeJS.Timer | null;
private _handle(...args: any[]): void;
public readonly client: Client;
@@ -1762,7 +1763,10 @@ declare module 'discord.js' {
type CollectorHandler<K, V> = { key: K, value: V };
type CollectorFilter = (...args: any[]) => boolean;
type CollectorOptions = { time?: number };
type CollectorOptions = {
time?: number;
idle?: number;
};
type ColorResolvable = ('DEFAULT'
| 'WHITE'