I save ids of all users of my bot in a database but how can I get their current username if I know id? I'm using Python 3 and Telepot framework.
Information about a user from user_id can be obtained by the getChat method in telepot.
bot = telepot.Bot(TOKEN)
info = bot.getChat(user_id)
print(info)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With