Source code for telegram_framework.links.command_params
from django.urls.resolvers import RoutePattern
def _match_function(message, pattern):
route_pattern = RoutePattern(f'/{pattern}')
return route_pattern.match(message.text)
[docs]
def get_match_function(pattern):
def inner(message):
return _match_function(message, pattern)
return inner