Plugins: Developer Overview¶
- Action command¶
An action command is a Named rule that reacts to a name in a message sent with the
- Command prefix¶
- Entry point plugin¶
A plugin that is an installed Python package and exposed through the
sopel.pluginssetuptools entry point.
- Find rule¶
A find rule is a Generic rule that triggers for every time the regex matches a part of the message.
- Folder plugin¶
A plugin composed of a directory that contains a
__init__.pyfile. It is not considered as a proper Python package unless its parent directory is in
sys.path. As they can create problems, they are not recommended, and either Single file plugin or Entry point plugin should be used instead.
- Generic rule¶
A generic rule matches any message using a regular expression. It doesn’t use any specific format, unlike a Named rule. It can match the whole message (Match rule), or any part of it (Search rule), or it may trigger for every match in the message (Find rule).
- Match rule¶
A match rule is a Generic rule that triggers when the regex matches the whole message.
- Named rule¶
A named rule is a rule that uses a regular expression with a specific format: with a name, and usually with a prefix, or a set of specific conditions. See Command, Action command, and Nick command. A named rule always matches the message from its start, and it accepts any number of arguments:
[nick] <prefix><name> [<arg1> <arg2> <...> <argN>]
A named rule can have aliases, i.e. alternative names used to trigger the rule.
- Namespace package plugin¶
A plugin that is a Python namespace package, i.e. a package within a specific namespace (
sopel_modulesis the namespace, and
<name>is the plugin’s name). This is the old way to distribute plugins and is not recommended; Entry point plugin should be used instead.
- Nick command¶
A nick command (or nickname command) is a Named rule that reacts to a name prefixed by the bot’s nickname in a message.
- Plugin callable¶
- Plugin job¶
A plugin job is a Python callable, that executes periodically on a schedule. See also the Plugin Anatomy: jobs section for the plugin job signature.
- Rate limiting¶
How often a rule can be triggered on a per-user basis, in a channel, or across the IRC network.
A rule defines how to match a specific message from the IRC server, usually with a regular expression. It also defines how to react to these messages. For that it can execute a callable.
- Rule system¶
The rule system is how Sopel manages and handles rules.
- Search rule¶
A search rule is a Generic rule that triggers when the regex matches any part of the message.
- Single file plugin¶
A Sopel plugin composed of a single Python file. Can be loaded by Sopel even when it’s not available from
- Sopel plugin¶
A person who does Sopelunking.
Action performed by a Sopelunker.
- URL callback¶
A URL callback is a rule that triggers for every URL in a message.