class ReactionCollector
extends
Collector<Snowflake | string, MessageReaction, [User]>export class ReactionCollector extends Collector<Snowflake | string, MessageReaction, [User]>
Collects reactions on messages. Will automatically stop if the message (messageDelete or messageDeleteBulk), channel (channelDelete), thread (threadDelete), or guild (guildDelete) is deleted.
Constructors
message: Messageoptions?: ReactionCollectorOptions)
constructor(Collection<Snowflake, MessageReaction> collected :
The items collected by this collector
Inherited from: Collector
The reason this collector has ended with, or null if it hasn't ended yet
Inherited from: Collector
CollectorFilter<[MessageReaction, ...[]> filter :
The filter applied to this collector
Inherited from: Collector
The Date at which this collector last collected an item
Inherited from: Collector
The timestamp at which this collector last collected an item
Inherited from: Collector
Message message :
The message upon which to collect reactions
readonlyPromise<MessageReaction> next :
Returns a promise that resolves with the next collected element; rejects with collected elements if the collector finishes without receiving a next element
Inherited from: Collector
ReactionCollectorOptions options :
The options of this collector
number total :
The total number of reactions collected
Collection<Snowflake, User> users :
The users that have reacted to this message
collect(reaction: MessageReactionuser: User)
Emitted whenever a reaction is collected.
create(reaction: MessageReactionuser: User)
Emitted whenever a reaction is newly created on a message. Will emit only when a new reaction is added to the message, as opposed to collect which will be emitted even when a reaction has already been added to the message.
dispose(reaction: MessageReactionuser: User)
Emitted when the reaction had all the users removed and the dispose
option is set to true.
end(collected: Collectionreason: string)
Emitted when the collector is finished collecting.
ignore(args: any)
Emitted whenever an element is not collected by the collector.
remove(reaction: MessageReactionuser: User)
Emitted when the reaction had one user removed and the dispose
option is set to true.
[Symbol.asyncIterator]AsyncIterableIterator<[MessageReaction, ...[]> () :
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
collectreaction: MessageReactionuser: User) : Snowflake | string | null (
Handles an incoming reaction for possible collection.
disposereaction: MessageReactionuser: User) : Snowflake | string | null (
Handles a reaction deletion for possible disposal.
emptyvoid () :
Empties this reaction 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
static keyreaction: MessageReaction) : Snowflake | string (
Gets the collector key for a reaction.
onevent: 'collect' | 'dispose' | 'remove' | 'ignore'listener: (reaction: MessageReaction, user: User) => void) : this (
onceevent: 'collect' | 'dispose' | 'remove' | 'ignore'listener: (reaction: MessageReaction, user: User) => void) : this (
resetTimeroptions?: CollectorResetTimerOptions) : void (
Resets the collector's timeout and idle timer.
Inherited from: Collector