mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-27 19:31:14 +00:00
xtaodada
fb5a3f5baf
All checks were successful
Github commit to telegram / build (push) Successful in 13s
15 lines
377 B
Python
15 lines
377 B
Python
import contextlib
|
|
|
|
from pyrogram import filters
|
|
|
|
from pagermaid.enums import Message
|
|
from pagermaid.listener import raw_listener
|
|
|
|
|
|
@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()
|