Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 24, 2023
1 parent 3e343c3 commit edf1aba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/api/clients.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Bots

.. automethod:: Bot.listen(name=None)
:decorator:

.. automethod:: Bot.once(name=None, check=None)
:decorator:

Expand Down
6 changes: 3 additions & 3 deletions docs/api/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ This section outlines the different types of events listened by :class:`Client`.

There are 4 ways to register an event, the first way is through the use of
:meth:`Client.event`. The second way is through subclassing :class:`Client` and
overriding the specific events. The third way is through the use of :meth:`Client.listen`,
which can be used to assign multiple event handlers instead of only one like in :meth:`Client.event`.
overriding the specific events. The third way is through the use of :meth:`Client.listen`,
which can be used to assign multiple event handlers instead of only one like in :meth:`Client.event`.
The fourth way is through the use of :meth:`Client.once`, which serves as a one-time event listener. For example:

.. code-block:: python
Expand Down Expand Up @@ -40,7 +40,7 @@ The fourth way is through the use of :meth:`Client.once`, which serves as a one-
@client.listen()
async def on_message(message: discord.Message):
print(f"Received {message.content}")
# Runs only for the 1st 'on_message' event. Can be useful for listening to 'on_ready'
@client.once()
async def message(message: discord.Message):
Expand Down
2 changes: 1 addition & 1 deletion docs/ext/commands/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Bot

.. automethod:: Bot.listen(name=None)
:decorator:

.. automethod:: Bot.once(name=None, check=None)
:decorator:

Expand Down

0 comments on commit edf1aba

Please sign in to comment.