nickoala/telepot

How to get username by id

igorkrutilin opened this issue · 1 comments

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

Hello @igorkrutilin

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