Answer the question
In order to leave comments, you need to log in
How to make the bot react only to text?
if m.text == str(m.text):
bot.send_message(m.chat.id, 'Теперь введи номер телефона')
else:
trir=bot.send_message(m.chat.id, 'Я тебя не понимаю')
bot.register_next_step_handler(trir, fio)
Answer the question
In order to leave comments, you need to log in
Strings have a .isalpha() method that returns True if all characters in the string are alphabetic characters and there is at least one character in the string.
''.isalpha() # False
' '.isalpha() # False
'[email protected]#'.isalpha() # False
'abc'.isalpha() # True
'123'.isalpha() # False
'abc123'.isalpha() # False
'абв'.isalpha() # True
'абв123'.isalpha() # False
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question