Answer the question
In order to leave comments, you need to log in
How to combine 'Hi' and message.text?
if message.text in HELLOUSER:
bot.send_message(message.chat.id, 'привет' )
I am making my first telegram bot and I have several greetings in the HELLOUSER code, that is, when I write hello to the bot, he answers with the phrase hello written below, but if I write hello bot or (hello + any other text) he will answer what is written below in else I don't understand. I want to make it respond to (hello + any other text) with hello, and not with the text from else. Ie combine HELLOUSER + message.text
probably, but I do not understand how to do it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question