Apply suggestions from code review

This commit is contained in:
Lonami 2021-01-12 19:49:49 +01:00 committed by GitHub
parent d194bb08a3
commit 7143aec152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1290,15 +1290,14 @@ def resolve_invite_link(link):
try:
if len(payload) == 12:
# New format
return 0, *struct.unpack('>LQ', payload)
elif len(payload) == 16:
# Old Format
return struct.unpack('>LLQ', payload)
else:
raise TypeError
pass
except (struct.error, TypeError):
return None, None, None
pass
return None, None, None
def resolve_inline_message_id(inline_msg_id):