EmojiCollector class
The EmojiCollector class extends the NodeJS built-in EventEmitter class.
constructor
The EmojiCollector class requires three arguments. The first argument is an object with information about requirements which the reactions must meet to be collected. The second argument must be an instance of the Zyno Bot Addons Message class which defines the message where the collector must collect reactions of. The third argument must be an instance of the Zyno Bot Addons Addon class and defines the addon where the EmojiCollector class must be created for.
The data object may contain the following information:
filter
: A function with two parameters, a Reaction class and a User class, which can be used to set certain requirements for the reactions which should be collected.max
: A number which defines the maximum amount of reactions the bot may collect.time
: A number which defines the amount of milliseconds after the bot should stop collecting reactions.
Properties
id
A unique id where the EmojiCollector class can be defined with.
count
The amount of emoji's that have been collected by the collector.
max
The maximum amount of emoji's the collector may collect.
filter
A function which the collector uses to check if whether the reaction meets certain requirements set by the creator of the addon.
time
A number which represents the timestamp of the time when the collector automatically stops collecting any emoji's.
Functions
stop
Forces the EmojiCollector to stop with collecting new reactions.
Events
Last updated