Files
h1686bot/bot/filters/filter1686.py
2025-01-02 22:19:43 +02:00

24 lines
821 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
)