Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get chat first name in telebot

@bot.message_handler(func=lambda message: True)
def send_message(message:str):

user_first_name = str(message.chat.first_name)
bot.reply_to(message, 'Hi ' + user_frist_name)

# Result: Hi Saeed
 
PREVIOUS NEXT
Tagged: #chat #telebot
ADD COMMENT
Topic
Name
5+1 =