[V3] NumPy Docstrings (#1032)

* ALL THE DOCSTRINGS

* Remove imports in drivers package

* Fixed build warnings
This commit is contained in:
Tobotimus
2017-10-18 13:01:59 +11:00
committed by Will
parent 684004d614
commit c80684a129
14 changed files with 976 additions and 560 deletions

View File

@@ -1,6 +1,7 @@
"""The purpose of this module is to allow for Red to
further customise the command invocation context provided
by discord.py.
"""Module for Red's Context class
The purpose of this module is to allow for Red to further customise the command
invocation context provided by discord.py.
"""
import discord
@@ -12,27 +13,37 @@ TICK = "\N{WHITE HEAVY CHECK MARK}"
class RedContext(commands.Context):
"""
Command invocation context for Red.
"""Command invocation context for Red.
All context passed into commands will be of this type.
This class inherits from
:py:class:`commands.Context <discord.ext.commands.Context>`.
This class inherits from `commands.Context <discord.ext.commands.Context>`.
"""
async def send_help(self):
"""Send the command help message."""
"""Send the command help message.
Returns
-------
`list` of `discord.Message`
A list of help messages which were sent to the user.
"""
command = self.invoked_subcommand or self.command
pages = await self.bot.formatter.format_help_for(self, command)
ret = []
for page in pages:
await self.send(page)
ret.append(await self.send(page))
return ret
async def tick(self):
"""Add a tick reaction to the command message.
:return: ``True`` if adding the reaction succeeded.
:rtype: bool
Returns
-------
bool
:code:`True` if adding the reaction succeeded.
"""
try:
await self.message.add_reaction(TICK)