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