Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sopel bind trigger #2443

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/package/bot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ The bot and its state
:members:
:inherited-members:
:show-inheritance:
:exclude-members: SopelWrapper
2 changes: 1 addition & 1 deletion docs/source/plugin/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ automatically:
@plugin.thread(False)
@plugin.unblockable
@plugin.priority('medium')
def sasl_success(bot: SopelWrapper, trigger: Trigger):
def sasl_success(bot: Sopel, trigger: Trigger):
"""Resume capability negotiation on successful SASL auth."""
LOGGER.info("Successful SASL Auth.")
bot.resume_capability_negotiation(
Expand Down
4 changes: 2 additions & 2 deletions docs/source/plugin/anatomy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ the same interface:
.. py:function:: plugin_callable(bot, trigger)

:param bot: wrapped bot instance
:type bot: :class:`sopel.bot.SopelWrapper`
:type bot: :class:`sopel.bot.Sopel`
:param trigger: the object that triggered the call
:type trigger: :class:`sopel.trigger.Trigger`

A callable must accept two positional arguments: a
:class:`bot <sopel.bot.SopelWrapper>` object, and a
:class:`bot <sopel.bot.Sopel>` object, and a
:class:`trigger <sopel.trigger.Trigger>` object. Both are tied to the specific
message that matches the rule.

Expand Down
15 changes: 7 additions & 8 deletions docs/source/plugin/bot/talk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Make it talk
============

The most basic way to make the bot talk is to use its
:meth:`~sopel.bot.SopelWrapper.say` method. The wrapper knows the origin of
the trigger (a channel or a private message), and it will use this origin as
the default destination for your message::
:meth:`~sopel.bot.Sopel.say` method. The wrapper knows the origin of the
trigger (a channel or a private message), and it will use this origin as the
default destination for your message::

# will send that to trigger.sender
bot.say('The bot is now talking!')
Expand Down Expand Up @@ -41,7 +41,7 @@ rule is triggered, you can use the bot's settings::

The ``say`` method sends a ``PRIVMSG`` command to the IRC server. To send
a ``NOTICE`` command instead, you need to use the
:meth:`~sopel.bot.SopelWrapper.notice` method instead.
:meth:`~sopel.bot.Sopel.notice` method instead.


Make it reply
Expand All @@ -57,9 +57,8 @@ shortcut for that::

bot.reply('ping!')

As with the ``say`` method seen above, the
:meth:`~sopel.bot.SopelWrapper.reply` method can send your message to another
destination::
As with the ``say`` method seen above, the :meth:`~sopel.bot.Sopel.reply`
method can send your message to another destination::

bot.reply('ping!', '#another-channel')

Expand Down Expand Up @@ -90,6 +89,6 @@ Besides talking, the bot can also **act**:
* and even to :meth:`~sopel.bot.Sopel.quit` the server,

Oh, and let's not forget about ``/me does something``, which can be done with
the :meth:`~sopel.bot.SopelWrapper.action` method::
the :meth:`~sopel.bot.Sopel.action` method::

bot.action('does something')
Loading