Skip to content

export abstract Class

Collector ​

extends ​

EventEmitter

Constructor ​

ts
 new Collector( client, options )
ParameterTypeDescription
clientClient
options?Collector.O

Properties ​

get endReason : undefined | string ​

get next : Promise<Message> ​

readonly client : Client ​

collection : Collection<Collector.I, any> ​

ended : boolean ​

filter : CollectorFilter ​

options : undefined | Collector.O ​

Methods ​

asyncIterator ​

Returns: AsyncGenerator<unknown, void, unknown>

checkEnd( ) ​

Returns: boolean

collect( collect ) ​

ParameterTypeDescription
collectCollector.C

Returns: null | Collector.I

dispose( dispose ) ​

ParameterTypeDescription
disposeCollector.C

Returns: null | Collector.I

asynchandleCollect( collect ) ​

ParameterTypeDescription
collectCollector.C

Returns: Promise<void>

asynchandleDispose( dispose ) ​

ParameterTypeDescription
disposeCollector.C

Returns: Promise<void>

stop( reason ) ​

ParameterTypeDescription
reason = 'user'string

Returns: void

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.