mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Compare commits
No commits in common. "b8ebe4fd58f419c41ba27f75a1019993b31fbf69" and "5ca92ff63717984ad008f59043bec5f5829935d4" have entirely different histories.
b8ebe4fd58
...
5ca92ff637
|
@ -5,7 +5,6 @@ import logging
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import inspect
|
|
||||||
from typing import Any, List, Optional, Union
|
from typing import Any, List, Optional, Union
|
||||||
|
|
||||||
# this imports are used to avoid circular import error
|
# this imports are used to avoid circular import error
|
||||||
|
@ -594,8 +593,6 @@ class AsyncTeleBot:
|
||||||
elif message_filter == 'chat_types':
|
elif message_filter == 'chat_types':
|
||||||
return message.chat.type in filter_value
|
return message.chat.type in filter_value
|
||||||
elif message_filter == 'func':
|
elif message_filter == 'func':
|
||||||
if inspect.iscoroutinefunction(filter_value):
|
|
||||||
return await filter_value(message)
|
|
||||||
return filter_value(message)
|
return filter_value(message)
|
||||||
elif self.custom_filters and message_filter in self.custom_filters:
|
elif self.custom_filters and message_filter in self.custom_filters:
|
||||||
return await self._check_filter(message_filter,filter_value,message)
|
return await self._check_filter(message_filter,filter_value,message)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user