From 1764b322b1b2ec99c776ba1cd4089686da957043 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 7 Feb 2022 12:05:41 +0700 Subject: [PATCH] func --- program/music.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/program/music.py b/program/music.py index 2fefa11..d5b18c3 100644 --- a/program/music.py +++ b/program/music.py @@ -7,6 +7,7 @@ from pyrogram import Client from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant from pyrogram.types import InlineKeyboardMarkup, Message # pytgcalls stuff +from pytgcalls import idle from pytgcalls import StreamType from pytgcalls.types.input_stream import AudioPiped from pytgcalls.types.input_stream.quality import HighQualityAudio @@ -174,6 +175,7 @@ async def play(c: Client, m: Message): reply_markup=InlineKeyboardMarkup(buttons), caption=f"๐Ÿ—‚ **Name:** [{songname}]({link}) | `music`\n๐Ÿ’ญ **Chat:** `{chat_id}`\n๐Ÿงธ **Request by:** {requester}", ) + await idle() except Exception as e: await suhu.delete() await m.reply_text(f"๐Ÿšซ error:\n\nยป {e}") @@ -236,6 +238,7 @@ async def play(c: Client, m: Message): reply_markup=InlineKeyboardMarkup(buttons), caption=f"๐Ÿ—‚ **Name:** [{songname}]({url}) | `music`\n**โฑ Duration:** `{duration}`\n๐Ÿงธ **Request by:** {requester}", ) + await idle() except Exception as ep: await suhu.delete() await m.reply_text(f"๐Ÿšซ error: `{ep}`") @@ -295,6 +298,7 @@ async def play(c: Client, m: Message): reply_markup=InlineKeyboardMarkup(buttons), caption=f"๐Ÿ—‚ **Name:** [{songname}]({url}) | `music`\n**โฑ Duration:** `{duration}`\n๐Ÿงธ **Request by:** {requester}", ) + await idle() except Exception as ep: await suhu.delete() await m.reply_text(f"๐Ÿšซ error: `{ep}`")