iyad-f
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
1 deletions
-
discord/audit_logs.py
|
@ -874,7 +874,13 @@ class AuditLogEntry(Hashable): |
|
|
def _convert_target_emoji(self, target_id: int) -> Union[Emoji, Object]: |
|
|
def _convert_target_emoji(self, target_id: int) -> Union[Emoji, Object]: |
|
|
return self._state.get_emoji(target_id) or Object(id=target_id, type=Emoji) |
|
|
return self._state.get_emoji(target_id) or Object(id=target_id, type=Emoji) |
|
|
|
|
|
|
|
|
def _convert_target_message(self, target_id: int) -> Union[Member, User, Object]: |
|
|
def _convert_target_message(self, target_id: Optional[int]) -> Optional[Union[Member, User, Object]]: |
|
|
|
|
|
# The message_pin and message_unpin action types do not have a |
|
|
|
|
|
# non-null target_id so safeguard against that |
|
|
|
|
|
|
|
|
|
|
|
if target_id is None: |
|
|
|
|
|
return None |
|
|
|
|
|
|
|
|
return self._get_member(target_id) or Object(id=target_id, type=Member) |
|
|
return self._get_member(target_id) or Object(id=target_id, type=Member) |
|
|
|
|
|
|
|
|
def _convert_target_stage_instance(self, target_id: int) -> Union[StageInstance, Object]: |
|
|
def _convert_target_stage_instance(self, target_id: int) -> Union[StageInstance, Object]: |
|
|