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
constructor(message: Messageoptions?: ReactionCollectorOptions)
collected : Collection<Snowflake, MessageReaction>
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
filter : CollectorFilter<[MessageReaction, ...[]>
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
readonlynext : Promise<MessageReaction>
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
options : ReactionCollectorOptions
The options of this collector
total : number
The total number of reactions collected
users : Collection<Snowflake, User>
The users that have reacted to this message
[Symbol.asyncIterator]() : AsyncIterableIterator<[MessageReaction, ...[]>
Inherited from: Collector
checkEnd() : boolean
Checks whether the collector should end, and if so, ends it.
Returns: Whether the collector ended or not
Inherited from: Collector
collect(reaction: MessageReactionuser: User) : Snowflake | string | null
Handles an incoming reaction for possible collection.
dispose(reaction: MessageReactionuser: User) : Snowflake | string | null
Handles a reaction deletion for possible disposal.
empty() : void
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 key(reaction: MessageReaction) : Snowflake | string
Gets the collector key for a reaction.
on(event: 'collect' | 'dispose' | 'remove' | 'ignore'listener: (reaction: MessageReaction, user: User) => void) : this
once(event: 'collect' | 'dispose' | 'remove' | 'ignore'listener: (reaction: MessageReaction, user: User) => void) : this
resetTimer(options?: CollectorResetTimerOptions) : void
Resets the collector's timeout and idle timer.
Inherited from: Collector
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.