1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Some useful filters

Created useful filters that can be used in message handlers.
Created some examples on using them.
This commit is contained in:
coder2020official
2021-09-12 19:34:43 +05:00
parent 4e37662ab3
commit 5f8c75816e
4 changed files with 94 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ class TeleBot:
self.poll_answer_handlers = []
self.my_chat_member_handlers = []
self.chat_member_handlers = []
self.custom_filters = {}
self.custom_filters = {'text': util.TextFilter(), 'text_contains': util.TextContains(), 'chat_id': util.UserFilter(), 'text_startswith': util.TextStarts()}
if apihelper.ENABLE_MIDDLEWARE:
self.typed_middleware_handlers = {