Skip to content

export Class

CallbackCollector ​

extends ​

Collector<CallbackCollectorOptions, string, CallbackQuery>

Constructor ​

ts
 new CallbackCollector( chat, options )
ParameterTypeDescription
chatChat
options?CallbackCollectorOptions

Properties ​

get endReason : undefined | string ​

get next : Promise<Message> ​

chat : Chat ​

readonly client : Client ​

collection : Collection<string, any> ​

ended : boolean ​

filter : CollectorFilter ​

options : undefined | CallbackCollectorOptions ​

received : number ​

Methods ​

asyncIterator ​

Returns: AsyncGenerator<unknown, void, unknown>

checkEnd( ) ​

Returns: boolean

collect( collect ) ​

ParameterTypeDescription
collectCallbackQuery

Returns: null | string

dispose( collect ) ​

ParameterTypeDescription
collectCallbackQuery

Returns: null | string

asynchandleCollect( collect ) ​

ParameterTypeDescription
collectCallbackQuery

Returns: Promise<void>

asynchandleDispose( dispose ) ​

ParameterTypeDescription
disposeCallbackQuery

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.