Reaction collector for messages. Includes a ReactionCollector class. Thanks Riya for letting me hack use eris-reactions in Pluris!
Parameter Type Default Description [options] Object {} Reaction Collector options [options.timeout] Number 10000 Length in milliseconds before the collector ends automatically. Set this and count to 0 for continous/permanent collection [options.count] Number 10 Maximum number of reactions to collect. Set this and timeout to 0 for continous/permanent collection [options.filter] Function (userID) => true A function to check whether the reaction is valid or not Returns
Promise<ReactionCollector>
- See below for use
Parameter Type Default Description message Message Message the reaction collector should run on [options] Object {} See above Returns
Promise<ReactionCollector>
- See below for use
Parameter Type Default Description message Message Message the reaction collector should run on [options] Object {} See above
Property Type Description message Message Message the reaction collector should run on timeout Number Length in milliseconds before the collector ends automatically count Number Maximum number of reactions to collect collected Array<Object> Reactions collected running Boolean Whether the collector is running or not handler ReactionHandler? Reaction Handler
A filter to check whether the reaction is valid or not
Parameter Type Default Description userID String User ID to check if valid Returns
Boolean
Start collecting reactions
Returns
Promise<ReactionCollector>
Stop collecting reactions
Returns
void
Fired when a reaction has been collected
Parameter Type Description reaction Object Reaction that was added to the collection
Fired when the collector has finished