The Same toy plugin, that replies to the text "same" with "same".
Initialises the Same plugin's resources.
Initialises the Same plugin. Do whatever you want here.
Reacts to the message "same" by agreeing with "same".
Catches bus messages.
Reacts to the messages which match the text "same" with some optional punctuation afterwards.
Postprocesses events.
Reloads the Same plugin.
Sets up the Same plugin. Think of it as a constructor.
Tears down the Same plugin. Think of it as a destructor.
Called on each iteration of the main loop.
Settings for the Same plugin. These are automatically read from and written to disk by other parts of the program as long as it is annotated @Settings.
This is an example toy plugin to showcase how one could be written to react to non-!command messages.
In the first approach (version MatchByStringComparison), the function is annotated to be called on all channel messages, and the body has to decide whether or not to react to it and reply.
In the second approach (version MatchWithRegex), the function is only called if the incoming message matched its regular expression, so the body can safely assume it should always react and reply.