Fix isisintance typo (#3749)

This commit is contained in:
James R T
2022-02-27 21:02:12 +08:00
committed by GitHub
parent e80371b6d0
commit c47a9346e1

View File

@@ -966,7 +966,7 @@ def get_peer_id(peer):
Extract the integer ID from the given :tl:`Peer`.
"""
pid = getattr(peer, 'user_id', None) or getattr(peer, 'channel_id', None) or getattr(peer, 'chat_id', None)
if not isisintance(pid, int):
if not isinstance(pid, int):
_raise_cast_fail(peer, 'int')
return pid