Added voice message logging

This commit is contained in:
Profitroll 2022-12-18 17:54:58 +01:00
parent f905a5c4df
commit b345a5d776

View File

@ -1,8 +1,10 @@
from random import choice from random import choice
from app import app from app import app
from pyrogram import filters from pyrogram import filters
from modules.logging import logWrite
from modules.utils import configGet, locale from modules.utils import configGet, locale
@app.on_message(~ filters.scheduled & filters.voice & filters.chat(configGet("destination_group"))) @app.on_message(~ filters.scheduled & filters.voice & filters.chat(configGet("destination_group")))
async def voice_message(app, msg): async def voice_message(app, msg):
logWrite(f"User {msg.from_user.id} sent voice message in destination group")
await msg.reply_text(choice(locale("voice_message", "message"))) await msg.reply_text(choice(locale("voice_message", "message")))