Class constructor.
Class constructor.
End the callback.
Set the callback to be run at the end, when this.end() is called
Set the callback to be run upon each message
Listen for message create events, internally. This is where the bulk of the logic is. Shouldn't be overloaded or overwritten
The callback to execute upon each message, as a delegate
The maximum amount of messages to listen to
The channel the MessageCollector is for. Only listens to messages in this channel
Whether the MessageCollector is finished or not, used to track state internally
The delegate to run when end() is called, passed to the Vibe.d timer upon creation; is @safe, but the delegate passed to onEnd does not need to be @safe, as it constructs a @trusted one from whatever's passed to it
An optional (delegate) filter to check against; should return a bool, and take a Message; can be passed to the constructor. Example: m => m.author.id == 1234567890
The time the collector should wait after a message. The collector ends, and calls the ending callback, when this time is up
A Vibe.d Timer coresponding to the idleTimeout variable, used to track idle timeout internally - resetted after each message recieved
An array of messages which is appended to every time a message is recieved, provided to the ending callback when done
The number of messages listened to so far, used to track state internally
The time the collector should run for, represented as a Duration object. The collector ends, and calls the ending callback, when this time is up
A Vibe.d timer coresponding to the timeout variable, used to track timeout internally
Bot instance for this plugin. Should always be set
Current runtime state for this plugin
Undocumented in source.
Undocumented in source.
Undocumented in source.
The path to the dynamic library this plugin was loaded from. If set, this signals this Plugin was loaded from a dynamic library, and can be reloaded from the given path.
Plugin log instance.
Used to load the Plugin, initially loading state if requred.
Used to unload the Plugin. Saves config/storage if required.
Returns path to this plugins storage directory.
Returns path to this plugins storage file.
Returns path to this plugins config file.
Storage instance for this plugin.
Config instance for this plugin
PluginOptions for this plugin
Client instance for the Bot running this plugin
User instance for the account this bot is running under
Returns the name of this plugin.
MessageCollector is a feature-complete message collector with timeouts, callbacks, and filters, inspired by Discord.js. It can be used for listening to user input in seperate messages