Reputation: 154
I want to set both TemplateResponseFilter and TextFilter in one message handler in a function. i used one handler before like this:
@dispatcher.message_handler(TextFilter(pattern=["start"]))
but i couldn't set both of them. any one can help?
Upvotes: 3
Views: 204
Reputation: 345
you can use this sample code
@dispatcher.message_handler(
filters=[TemplateResponseFilter(pattern=TMessage.start), TextFilter(keywords="start")])
Upvotes: 4