From 5c9fba78b8fc744fd008e1631acd12da5d1e9182 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 1 Nov 2021 11:17:54 +0700 Subject: [PATCH] fixes --- driver/utils.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/driver/utils.py b/driver/utils.py index 1cc7e39..a97d3b1 100644 --- a/driver/utils.py +++ b/driver/utils.py @@ -65,17 +65,7 @@ async def skip_item(chat_id, h): @call_py.on_stream_end() async def on_end_handler(_, u: Update): - if isinstance(u, StreamAudioEnded) or isinstance(u, StreamVideoEnded): - chat_id = u.chat_id - print(chat_id) - op = await skip_current_song(chat_id) - if op==1: - await _.send_message(chat_id, "āŒ __Queues__ **is empty.**\n\n**ā€¢ userbot leaving voice chat**") - else: - await _.send_photo( - chat_id, - photo=f"{IMG_4}", - caption=f"šŸ’” **Streaming next track**\n\nšŸ· **Name:** [{op[0]}]({op[1]})\nšŸ’­ **Chat:** `{chat_id}`\nšŸ’” **Status:** `Playing`", - ) - else: - pass + if isinstance(u, StreamAudioEnded) or isinstance(u, StreamVideoEnded): + chat_id = u.chat_id + print(chat_id) + await skip_current_song(chat_id)