mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Return invites when deleting them via Invite.delete or Client.delete_invite
This commit is contained in:
@ -2550,7 +2550,7 @@ class Client:
|
||||
)
|
||||
return Invite.from_incomplete(state=self._connection, data=data)
|
||||
|
||||
async def delete_invite(self, invite: Union[Invite, str], /) -> None:
|
||||
async def delete_invite(self, invite: Union[Invite, str], /) -> Invite:
|
||||
"""|coro|
|
||||
|
||||
Revokes an :class:`.Invite`, URL, or ID to an invite.
|
||||
@ -2578,7 +2578,8 @@ class Client:
|
||||
"""
|
||||
|
||||
resolved = utils.resolve_invite(invite)
|
||||
await self.http.delete_invite(resolved.code)
|
||||
data = await self.http.delete_invite(resolved.code)
|
||||
return Invite.from_incomplete(state=self._connection, data=data)
|
||||
|
||||
# Miscellaneous stuff
|
||||
|
||||
|
Reference in New Issue
Block a user