mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Add support for audit log reasons.
Most routes now have a 'reason' keyword argument.
This commit is contained in:
@ -147,11 +147,16 @@ class Invite(Hashable):
|
||||
yield from self._state.http.accept_invite(self.code)
|
||||
|
||||
@asyncio.coroutine
|
||||
def delete(self):
|
||||
def delete(self, *, reason=None):
|
||||
"""|coro|
|
||||
|
||||
Revokes the instant invite.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
reason: Optional[str]
|
||||
The reason for deleting this invite. Shows up on the audit log.
|
||||
|
||||
Raises
|
||||
-------
|
||||
Forbidden
|
||||
@ -162,4 +167,4 @@ class Invite(Hashable):
|
||||
Revoking the invite failed.
|
||||
"""
|
||||
|
||||
yield from self._state.http.delete_invite(self.code)
|
||||
yield from self._state.http.delete_invite(self.code, reason=reason)
|
||||
|
Reference in New Issue
Block a user