From 8ff19365a781414f654eca70921dc1bca5d6aac4 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Thu, 24 Feb 2022 10:26:12 +0700 Subject: [PATCH] [check] some exceptions --- program/video_stream.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/program/video_stream.py b/program/video_stream.py index 6938025..ab95ea7 100644 --- a/program/video_stream.py +++ b/program/video_stream.py @@ -194,6 +194,8 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str await remove_active_chat(chat_id) traceback.print_exc() await m.reply_text("❌ The bot can't find the Group call or it's inactive.\n\n» Use /startvc command to turn on the Group call !") + except BaseException as err: + print(err) else: await m.reply( "» reply to an **video file** or **give something to search.**" @@ -327,6 +329,8 @@ async def vplay(c: Client, m: Message): await suhu.delete() await remove_active_chat(chat_id) await m.reply_text("❌ The content you provide to play has no audio source") + except BaseException as err: + print(err) else: if len(m.command) < 2: @@ -410,6 +414,8 @@ async def vplay(c: Client, m: Message): await suhu.delete() await remove_active_chat(chat_id) await m.reply_text("❌ The content you provide to play has no audio source") + except BaseException as err: + print(err) @Client.on_message(command(["vstream", f"vstream@{BOT_USERNAME}"]) & other_filters) @@ -543,6 +549,4 @@ async def vstream(c: Client, m: Message): await remove_active_chat(chat_id) await m.reply_text("❌ The bot can't find the Group call or it's inactive.\n\n» Use /startvc command to turn on the Group call !") except BaseException as err: - await loser.delete() - await remove_active_chat(chat_id) - await m.reply_text(f"🚫 error: `{err}`") + print(err)