mirror of
https://github.com/Xtao-Labs/sticker-captcha-bot.git
synced 2024-11-25 09:37:34 +00:00
18 lines
457 B
Python
18 lines
457 B
Python
from cashews import cache
|
|
from pyrogram import filters
|
|
|
|
from sticker import bot
|
|
from sticker.single_utils import Message
|
|
|
|
|
|
@bot.on_message(filters=filters.group & ~filters.service, group=1)
|
|
async def clean_message(_, message: "Message"):
|
|
if not message.from_user:
|
|
return
|
|
cid = message.chat.id
|
|
uid = message.from_user.id
|
|
key = f"wait:{cid}:{uid}"
|
|
result = await cache.get(key)
|
|
if result:
|
|
await message.delay_delete(1)
|