mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Update type hints in AuditLogEntry.user and AuditLogEntry.user_id
This commit is contained in:
parent
2869d8000d
commit
d11c42c2e6
@ -541,10 +541,10 @@ class AuditLogEntry(Hashable):
|
||||
-----------
|
||||
action: :class:`AuditLogAction`
|
||||
The action that was done.
|
||||
user: :class:`abc.User`
|
||||
user: Optional[:class:`abc.User`]
|
||||
The user who initiated this action. Usually a :class:`Member`\, unless gone
|
||||
then it's a :class:`User`.
|
||||
user_id: :class:`int`
|
||||
user_id: Optional[:class:`int`]
|
||||
The user ID who initiated this action.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
@ -670,7 +670,7 @@ class AuditLogEntry(Hashable):
|
||||
# into meaningful data when requested
|
||||
self._changes = data.get('changes', [])
|
||||
|
||||
self.user_id = utils._get_as_snowflake(data, 'user_id')
|
||||
self.user_id: Optional[int] = utils._get_as_snowflake(data, 'user_id')
|
||||
self.user: Optional[Union[User, Member]] = self._get_member(self.user_id)
|
||||
self._target_id = utils._get_as_snowflake(data, 'target_id')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user