mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
The restriction_reason field is not always available
This commit is contained in:
parent
1fe46610cd
commit
35e3471961
@ -215,7 +215,7 @@ def parse_channel_chat(channel: types.Channel) -> pyrogram_types.Chat:
|
||||
title=channel.title,
|
||||
username=getattr(channel, "username", None),
|
||||
photo=parse_chat_photo(getattr(channel, "photo", None)),
|
||||
restriction_reason=channel.restriction_reason
|
||||
restriction_reason=getattr(channel, "restriction_reason")
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user