how to get chat first name in telebot

Solutions on MaxInterview for how to get chat first name in telebot by the best coders in the world

showing results for - "how to get chat first name in telebot"
Alexa
27 Jul 2020
1@bot.message_handler(func=lambda message: True)
2def send_message(message:str):
3
4user_first_name = str(message.chat.first_name)
5bot.reply_to(message, 'Hi ' + user_frist_name)
6
7# Result: Hi Saeed