Answer the question
In order to leave comments, you need to log in
How to set text value to if message text?
Hello everyone, I want to implement the District Selection in the bot. i.e. the bot asks the person "What area are you in"
I.e. what to write in if message.text == ' what to write here ' so that only text messages are read, and if, for example, numbers, then the bot would answer such an area does not exist
if message.text == ' what to write here to accept any text, not just one word ':
bot.send_message(call.message.chat.id, 'Okay, thanks for the answer!')
else:
bot. send_message(call.message.chat.id, 'This city doesn't exist')
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