0

pyrogram doesn't see the chat description

I write to my chat with a description and

@app.on_message()
async def handler(_, msg: types.Message):
    print(msg.chat.bio)
    print(msg.chat.description)

this /\ outputs this \/

None
None

1 Answers1

0

The Chat object within the Message object doesn't have the description. You have to explicitly call app.get_chat() to get the Chat.bio or Chat.description.

bio (str, optional) – Bio of the other party in a private chat. Returned only in get_chat().

description (str, optional) – Description, for groups, supergroups and channel chats. Returned only in get_chat().

https://docs.pyrogram.org/api/types/Chat

ColinShark
  • 1,047
  • 2
  • 10
  • 18