24 lines
821 B
Python
24 lines
821 B
Python
from aiogram.filters import BaseFilter
|
||
from aiogram.types import Message, BusinessConnection
|
||
import re
|
||
|
||
|
||
class Filter1686(BaseFilter):
|
||
async def __call__(self, message: Message):
|
||
if not message.text:
|
||
return False
|
||
|
||
return re.match(r".*16.*8.*6.*", message.text) or re.match(
|
||
r".*шест?над?цать.*восемь.*шест?ь.*десят[ыі]х", message.text, flags=re.IGNORECASE
|
||
)
|
||
|
||
|
||
class FilterBusiness1686(BaseFilter):
|
||
async def __call__(self, business_message: Message):
|
||
if not business_message.text:
|
||
return False
|
||
|
||
return re.match(r".*16.*8.*6.*", business_message.text) or re.match(
|
||
r".*шест?над?цать.*восемь.*шест?ь.*десят[ыі]х", business_message.text, flags=re.IGNORECASE
|
||
)
|