S
S
SashaN692021-07-25 20:47:48
Python
SashaN69, 2021-07-25 20:47:48

How to parse profile description in telegram?

How to parse profile description in telegram if there is username ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2021-07-25
@SashaN69

Open the documentation once or twice and see there that there is a User object with data.
With the knowledge of this fact, you can already go ahead and write code, it doesn’t matter if you are accessing the API directly or using a wrapper library.
Clue:message.from_user

{
   "id":5786161XX,
   "is_bot":false,
   "first_name":"Andrew",
   "username":"D.",
   "last_name":"None",
   "language_code":"en",
   "can_join_groups":"None",
   "can_read_all_group_messages":"None",
   "supports_inline_queries":"None"
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question