mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Return invites when deleting them via Invite.delete or Client.delete_invite
This commit is contained in:
1 parent
d00c124883
commit
4862ea22fd
3 files changed
+7
-5
No files matched your search
+3
-2
@@ -546,7 +546,7 @@ class Invite(Hashable):
|
||||
|
||||
return self
|
||||
|
||||
async def delete(self, *, reason: Optional[str] = None) -> None:
|
||||
async def delete(self, *, reason: Optional[str] = None) -> Self:
|
||||
"""|coro|
|
||||
|
||||
Revokes the instant invite.
|
||||
@@ -568,4 +568,5 @@ class Invite(Hashable):
|
||||
Revoking the invite failed.
|
||||
"""
|
||||
|
||||
await self._state.http.delete_invite(self.code, reason=reason)
|
||||
data = await self._state.http.delete_invite(self.code, reason=reason)
|
||||
return self.from_incomplete(state=self._state, data=data)
|
||||
Reference in new issue
Block a user