kameloso.plugins.same

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.

Members

Classes

SamePlugin
class SamePlugin

The Same toy plugin, that replies to the text "same" with "same".

Functions

onAnyMessage
void onAnyMessage(SamePlugin plugin, IRCEvent event)

Reacts to the message "same" by agreeing with "same".

onAnyMessageRegex
void onAnyMessageRegex(SamePlugin plugin, IRCEvent event)

Reacts to the messages which match the text "same" with some optional punctuation afterwards.

Structs

SameSettings
struct SameSettings

Settings for the Same plugin, to toggle it on or off.

See Also

Meta