Telebot Python. How does the user allow only numbers?
Laycee last edited by
I can't find information on how to allow the user to enter only numbers. int(message.text) makes a mistake. I should be grateful to those who decide to help.
You can't influence the user input. But you can check that he put the number on a method.
isdigitor write a processor for purely chips.
text = '256' print(text.isdigit()) # True
text = 'Hello, World!'
print(text.isdigit()) # False