export class MessageCollector extends Collector<Snowflake, Message, [Collection<Snowflake, Message>]>
Collects messages on a channel. Will automatically stop if the channel (channelDelete), thread (threadDelete), or guild (guildDelete) is deleted.
Constructors
channel: TextBasedChanneloptions?: MessageCollectorOptions)
constructor(TextBasedChannel channel :
The channel
readonlyClient client :
The client that instantiated this Collector
Collection collected :
The items collected by this collector
boolean ended :
Whether this collector has finished collecting
readonlyoptionalstring endReason? :
The reason this collector has ended with, or null if it hasn't ended yet
CollectorFilter filter :
The filter applied to this collector
optionalDate lastCollectedAt? :
The Date at which this collector last collected an item
optionalnumber lastCollectedTimestamp? :
The timestamp at which this collector last collected an item
readonlyPromise next :
Returns a promise that resolves with the next collected element; rejects with collected elements if the collector finishes without receiving a next element
MessageCollectorOptions options :
The options of this collector
number received :
Total number of messages that were received in the channel during message collection
[Symbol.asyncIterator]AsyncIterableIterator<[Message, ...[]> () :
Inherited from: Collector
checkEndboolean () :
Checks whether the collector should end, and if so, ends it.
Returns: Whether the collector ended or not
Inherited from: Collector
Call this to handle an event as a collectable element. Accepts any event data as parameters.
Inherited from: Collector
Call this to remove an element from the collection. Accepts any event data as parameters.
Inherited from: Collector
onEventKey extends keyof CollectorEventTypes<Snowflake, Message, [>
>(event: EventKeylistener: (...args: CollectorEventTypes<Snowflake, Message, [>[EventKey]) => Awaitable<void>) : this <
EventKey extends keyof CollectorEventTypes<Snowflake, Message, [>
Inherited from: Collector
onceEventKey extends keyof CollectorEventTypes<Snowflake, Message, [>
>(event: EventKeylistener: (...args: CollectorEventTypes<Snowflake, Message, [>[EventKey]) => Awaitable<void>) : this <
EventKey extends keyof CollectorEventTypes<Snowflake, Message, [>
Inherited from: Collector
resetTimeroptions?: CollectorResetTimerOptions) : void (
Resets the collector's timeout and idle timer.
Inherited from: Collector
collectmessage: Message) (
Emitted whenever a message is collected.
disposemessage: Message) (
Emitted whenever a message is disposed of.
endcollected: Collectionreason: string) (
Emitted when the collector is finished collecting.
ignoreargs: any) (
Emitted whenever an element is not collected by the collector.