From 28efdb928c810aefab0a07164fc33b0aaf50e432 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 1 Nov 2021 07:49:12 +0700 Subject: [PATCH] test --- program/admins.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/program/admins.py b/program/admins.py index 1909654..aaf1988 100644 --- a/program/admins.py +++ b/program/admins.py @@ -165,11 +165,16 @@ async def unmute(client, m: Message): command(["volume", f"volume@{BOT_USERNAME}", "vol"]) & other_filters ) @authorized_users_only -async def change_volume(client, m: Message): +async def unmute(client, m: Message): range = m.command[1] chat_id = m.chat.id - try: - await call_py.change_volume_call(chat_id, volume=int(range)) - await m.reply(f"✅ **volume set to** `{range}`%") - except Exception as e: - await m.reply(f"🚫 **error:**\n\n{e}") + if chat_id in QUEUE: + try: + await call_py.change_volume_call(chat_id, volume: int(range)) + await m.reply( + f"✅ **volume set to** `{range}`%" + ) + except Exception as e: + await m.reply(f"🚫 **error:**\n\n`{e}`") + else: + await m.reply("❌ **nothing in streaming**")