update docs and add message replies

This commit is contained in:
iDutchy
2020-11-18 17:49:58 -06:00
parent 195bace135
commit 690dcdaf2e
11 changed files with 234 additions and 48 deletions

View File

@ -332,3 +332,28 @@ class Context(discord.abc.Messageable):
return None
except CommandError as e:
await cmd.on_help_command_error(self, e)
async def reply(self, content=None, **kwargs):
"""|coro|
A shortcut method to :meth:`~discord.abc.Messageable.send` to reply to the
:class:`~discord.Message` that invoked the command.
.. versionadded:: 1.5.1.5
Raises
--------
~discord.HTTPException
Sending the message failed.
~discord.Forbidden
You do not have the proper permissions to send the message.
~discord.InvalidArgument
The ``files`` list is not of the appropriate size or
you specified both ``file`` and ``files``.
Returns
---------
:class:`~discord.Message`
The message that was sent.
"""
return await self.message.reply(content, **kwargs)