From a251a3f6465b7b3eef67195d55ef972b8cb4403b Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:27:56 +0100 Subject: [PATCH] Remove invite from InviteUsersJob for consistency --- discord/invite.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/discord/invite.py b/discord/invite.py index 2b1137fa9..5a4345d01 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -82,8 +82,6 @@ class InviteUsersJob: Attributes ----------- - invite: :class:`Invite` - The invite this job status is for. status: :class:`InviteUsersJobStatus` The status of the job. total_users: :class:`int` @@ -98,8 +96,7 @@ class InviteUsersJob: The time the job was completed, if applicable. """ - def __init__(self, *, invite: Invite, data: InviteTargetUsersJobStatusPayload) -> None: - self.invite: Invite = invite + def __init__(self, data: InviteTargetUsersJobStatusPayload) -> None: self.status: InviteUsersJobStatus = try_enum(InviteUsersJobStatus, data['status']) self.total_users: int = data['total_users'] self.processed_users: int = data['processed_users'] @@ -109,7 +106,7 @@ class InviteUsersJob: def __repr__(self) -> str: return ( - f'<{self.__class__.__name__} invite={self.invite.code!r} status={self.status} ' + f'<{self.__class__.__name__} status={self.status} ' f'total_users={self.total_users} processed_users={self.processed_users}>' ) @@ -708,7 +705,7 @@ class Invite(Hashable): """ data = await self._state.http.get_invite_target_users_job_status(self.code) - return InviteUsersJob(invite=self, data=data) + return InviteUsersJob(data) async def edit( self,