Checklist
Description
You can do it another way to recognize what kind of id it is. Instead of updating the range, since the user id is always positive, the group id always starts with -100, it's easier to do the logic
def get_peer_type(peer_id: int) -> str:
peer_id_str = str(peer_id)
if not peer_id_str.startswith("-"):
return "user"
elif peer_id_str.startswith("-100"):
return "channel"
else:
return "chat"
Checklist
Description
You can do it another way to recognize what kind of id it is. Instead of updating the range, since the user id is always positive, the group id always starts with -100, it's easier to do the logic