Class Collector<T>Abstract

A collector is just a wrapper over a set of events for collecting a structure. Commonly used for things like Message or MessageReaction collecting, collectors allow you to have your code wait until further input from a user.

Type Parameters

  • T extends CollectableStructure

Hierarchy

Constructors

Properties

boundItemReceiver: ((entry) => Promise<boolean>) = ...

Type declaration

    • (entry): Promise<boolean>
    • Bound function for item receiving

      Parameters

      • entry: T

      Returns Promise<boolean>

client: Client
emitter: TypedEventEmitter<CollectorEvents<T>> = ...
entries: Collection<T["id"], T> = ...

Collection of successfully collected entries

isActive: boolean = false

Whether the collector is actively collecting elements

maxTimeout: null | Timeout = null

Timeout for max time

options: Partial<CollectorOptions<T>>
resolve: null | ((value) => void) = null

Method to resolve the promise this collector has when instantiated

Methods

Generated using TypeDoc