Search code examples
pythonbotstelegrampython-telegram-bot

How to just take the numbers with MessageHandler


i am making a telegram bot and i have a question : How can i just take the numbers and deny other type to run callback with MessageHandler? my framework is python-telegram-bot


Solution

  • I found the solution : Using this code MessageHandler(Filters.regex(r'\d+'), callback)