export Class
MessageCollector ​
extends ​
Collector
<MessageCollectorOptions
, number
, Message
>
Constructor ​
ts
new MessageCollector( chat, options )
Parameter | Type | Description |
---|---|---|
chat | Chat | |
options? | MessageCollectorOptions |
Properties ​
get endReason : undefined
| string
​
get next : Promise
<Message
> ​
chat : Chat
​
readonly client : Client
​
collection : Collection
<number
, any
> ​
ended : boolean
​
filter : CollectorFilter
​
options : undefined
| MessageCollectorOptions
​
received : number
​
Methods ​
asyncIterator ​
Returns:
AsyncGenerator
<unknown
,void
,unknown
>
checkEnd( ) ​
Returns:
boolean
collect( message ) ​
Parameter | Type | Description |
---|---|---|
message | Message |
Returns:
null
|number
dispose( message ) ​
Parameter | Type | Description |
---|---|---|
message | Message |
Returns:
null
|number
asynchandleCollect( collect ) ​
Parameter | Type | Description |
---|---|---|
collect | Message |
Returns:
Promise
<void
>
asynchandleDispose( dispose ) ​
Parameter | Type | Description |
---|---|---|
dispose | Message |
Returns:
Promise
<void
>
stop( reason ) ​
Parameter | Type | Description |
---|---|---|
reason = 'user' | string |
Returns:
void