Browse Source

Fix 2 incorrect types for audit log converters

pull/9176/head
Steve C 2 years ago
committed by GitHub
parent
commit
f950019c75
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/audit_logs.py

4
discord/audit_logs.py

@ -749,7 +749,7 @@ class AuditLogEntry(Hashable):
def _convert_target_channel(self, target_id: int) -> Union[abc.GuildChannel, Object]:
return self.guild.get_channel(target_id) or Object(id=target_id)
def _convert_target_user(self, target_id: int) -> Union[Member, User, Object, None]:
def _convert_target_user(self, target_id: int) -> Union[Member, User, Object]:
return self._get_member(target_id) or Object(id=target_id, type=Member)
def _convert_target_role(self, target_id: int) -> Union[Role, Object]:
@ -779,7 +779,7 @@ class AuditLogEntry(Hashable):
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)
def _convert_target_message(self, target_id: int) -> Union[Member, User, Object, None]:
def _convert_target_message(self, target_id: int) -> Union[Member, User, Object]:
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]:

Loading…
Cancel
Save