Browse Source

InviteTargetUsersJobErrorStatus -> InviteJobStatus

pull/10386/head
Soheab 6 months ago
parent
commit
b7082063d4
  1. 4
      discord/enums.py
  2. 6
      discord/invite.py
  3. 2
      docs/api.rst

4
discord/enums.py

@ -87,7 +87,7 @@ __all__ = (
'MediaItemLoadingState', 'MediaItemLoadingState',
'CollectibleType', 'CollectibleType',
'NameplatePalette', 'NameplatePalette',
'InviteTargetUsersJobErrorStatus', 'InviteJobStatus',
) )
@ -1003,7 +1003,7 @@ class NameplatePalette(Enum):
white = 'white' white = 'white'
class InviteTargetUsersJobErrorStatus(Enum): class InviteJobStatus(Enum):
unspecified = 0 unspecified = 0
pending = 1 pending = 1
completed = 2 completed = 2

6
discord/invite.py

@ -35,7 +35,7 @@ from .enums import (
VerificationLevel, VerificationLevel,
InviteTarget, InviteTarget,
InviteType, InviteType,
InviteTargetUsersJobErrorStatus, InviteJobStatus,
try_enum, try_enum,
) )
from .appinfo import PartialAppInfo from .appinfo import PartialAppInfo
@ -99,7 +99,7 @@ class InviteTargetUsersJobStatus:
def __init__(self, *, invite: Invite, data: InviteTargetUsersJobStatusPayload) -> None: def __init__(self, *, invite: Invite, data: InviteTargetUsersJobStatusPayload) -> None:
self.invite: Invite = invite self.invite: Invite = invite
self.status: InviteTargetUsersJobErrorStatus = try_enum(InviteTargetUsersJobErrorStatus, data['status']) self.status: InviteJobStatus = try_enum(InviteJobStatus, data['status'])
self.total_users: int = data['total_users'] self.total_users: int = data['total_users']
self.processed_users: int = data['processed_users'] self.processed_users: int = data['processed_users']
self.created_at: datetime.datetime = parse_time(data['created_at']) self.created_at: datetime.datetime = parse_time(data['created_at'])
@ -681,7 +681,7 @@ class Invite(Hashable):
Returns Returns
-------- --------
:class:`InviteTargetUsersJobErrorStatus` :class:`InviteJobStatus`
The status of the target users job. The status of the target users job.
Raises Raises

2
docs/api.rst

@ -4154,7 +4154,7 @@ of :class:`enum.Enum`.
The collectible nameplate palette is white. The collectible nameplate palette is white.
.. class:: InviteTargetUsersJobErrorStatus .. class:: InviteJobStatus
Represents the error status of an invite target users job. Represents the error status of an invite target users job.

Loading…
Cancel
Save