Improve documentation

This commit is contained in:
NCPlayz
2019-05-18 06:04:54 -04:00
committed by Rapptz
parent 2f05436653
commit 3c9bcc2851
48 changed files with 652 additions and 569 deletions

View File

@@ -147,7 +147,7 @@ class BotBase(GroupMixin):
The default command error handler provided by the bot.
By default this prints to ``sys.stderr`` however it could be
By default this prints to :data:`sys.stderr` however it could be
overridden to have a different implementation.
This only fires if you do not specify any listeners for command error.
@@ -208,7 +208,7 @@ class BotBase(GroupMixin):
The function that was used as a global check.
call_once: :class:`bool`
If the function should only be called once per
:meth:`.Command.invoke` call.
:meth:`Command.invoke` call.
"""
if call_once:
@@ -241,7 +241,7 @@ class BotBase(GroupMixin):
r"""A decorator that adds a "call once" global check to the bot.
Unlike regular global checks, this one is called only once
per :meth:`.Command.invoke` call.
per :meth:`Command.invoke` call.
Regular global checks are called whenever a command is called
or :meth:`.Command.can_run` is called. This type of check
@@ -288,6 +288,11 @@ class BotBase(GroupMixin):
-----------
user: :class:`.abc.User`
The user to check for.
Returns
--------
:class:`bool`
Whether the user is the owner.
"""
if self.owner_id is None:
@@ -314,7 +319,7 @@ class BotBase(GroupMixin):
Parameters
-----------
coro
coro: :ref:`coroutine <coroutine>`
The coroutine to register as the pre-invoke hook.
Raises
@@ -347,7 +352,7 @@ class BotBase(GroupMixin):
Parameters
-----------
coro
coro: :ref:`coroutine <coroutine>`
The coroutine to register as the post-invoke hook.
Raises
@@ -420,7 +425,7 @@ class BotBase(GroupMixin):
event listener. Basically this allows you to listen to multiple
events from different places e.g. such as :func:`.on_ready`
The functions being listened to must be a coroutine.
The functions being listened to must be a :ref:`coroutine <coroutine>`.
Example
--------