19 lines
441 B
Python
19 lines
441 B
Python
|
"""Custom message filters"""
|
||
|
|
||
|
from pyrogram import filters
|
||
|
from pyrogram.types import Message
|
||
|
|
||
|
from classes.pyroclient import PyroClient
|
||
|
|
||
|
|
||
|
async def _mode_post_func(_, __: PyroClient, message: Message):
|
||
|
return __.config["mode"]["post"]
|
||
|
|
||
|
|
||
|
async def _mode_submit_func(_, __: PyroClient, message: Message):
|
||
|
return __.config["mode"]["submit"]
|
||
|
|
||
|
|
||
|
mode_post = filters.create(_mode_post_func)
|
||
|
mode_submit = filters.create(_mode_submit_func)
|