diff options
| author | NCPlayz <[email protected]> | 2019-05-18 06:04:54 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-06-07 19:27:46 -0400 |
| commit | 3c9bcc285147154a2980f6e661efdfa676672b6a (patch) | |
| tree | 657bafa75e4e0d45361e394443ea932ad70e86a7 /discord/ext/commands/bot.py | |
| parent | Added comment for/redo system information (diff) | |
| download | discord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.tar.xz discord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.zip | |
Improve documentation
Diffstat (limited to 'discord/ext/commands/bot.py')
| -rw-r--r-- | discord/ext/commands/bot.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 80511d23..66e245dc 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -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 -------- |