mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-24 22:23:36 +00:00
15 lines
384 B
Python
15 lines
384 B
Python
|
import contextlib
|
||
|
|
||
|
from pyrogram import filters
|
||
|
|
||
|
from pagermaid.listener import raw_listener
|
||
|
from pagermaid.single_utils import Message
|
||
|
|
||
|
|
||
|
@raw_listener(filters.private & filters.voice & filters.incoming)
|
||
|
async def voice_only_contact(message: Message):
|
||
|
with contextlib.suppress(Exception):
|
||
|
if message.from_user.is_contact:
|
||
|
return
|
||
|
await message.delete()
|