Remove reason keyword argument from message deletion.

Apparently this is unsupported.

Affected functions include:

* abc.Messageable.send
* Message.delete
* TextChannel.delete_messages
* TextChannel.purge
This commit is contained in:
Rapptz
2017-08-15 22:37:39 -04:00
parent adf99eb2cd
commit 63231ef033
3 changed files with 13 additions and 25 deletions

View File

@ -628,7 +628,7 @@ class Messageable(metaclass=abc.ABCMeta):
raise NotImplementedError
@asyncio.coroutine
def send(self, content=None, *, tts=False, embed=None, file=None, files=None, reason=None, delete_after=None, nonce=None):
def send(self, content=None, *, tts=False, embed=None, file=None, files=None, delete_after=None, nonce=None):
"""|coro|
Sends a message to the destination with the content given.
@ -664,9 +664,6 @@ class Messageable(metaclass=abc.ABCMeta):
If provided, the number of seconds to wait in the background
before deleting the message we just sent. If the deletion fails,
then it is silently ignored.
reason: Optional[str]
The reason for deleting the message, if necessary.
Shows up on the audit log.
Raises
--------
@ -723,7 +720,7 @@ class Messageable(metaclass=abc.ABCMeta):
def delete():
yield from asyncio.sleep(delete_after, loop=state.loop)
try:
yield from ret.delete(reason=reason)
yield from ret.delete()
except:
pass
compat.create_task(delete(), loop=state.loop)