nickoala / telepot

Python framework for Telegram Bot API
MIT License
2.42k stars 474 forks source link

How to get username by id #440

Open igorkrutilin opened 5 years ago

igorkrutilin commented 5 years ago

I save ids of all users of my bot in a database but how can I get their current username if I know id?

afsantaliestra commented 5 years ago

Hello @igorkrutilin

You can retrieve all the info of a user with: bot.getChat(chat_id)