This commit is contained in:
hhh
2025-01-02 22:19:43 +02:00
commit 9e29d01f1d
28 changed files with 1171 additions and 0 deletions

3
bot/filters/__init__.py Normal file
View File

@@ -0,0 +1,3 @@
from .filter1686 import Filter1686, FilterBusiness1686
__all__ = ["Filter1686", "FilterBusiness1686"]

23
bot/filters/filter1686.py Normal file
View File

@@ -0,0 +1,23 @@
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
)