This commit is contained in:
levina 2022-02-09 22:35:35 +07:00 committed by GitHub
parent cb9bf85f97
commit 7606e2bd64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
# Commit Start Date 20/10/2021 # Commit Start Date 20/10/2021
# Finished On 28/10/2021 # Finished On 28/10/2021
import os import os
# pyrogram stuff # pyrogram stuff
from pyrogram import Client from pyrogram import Client
@ -22,7 +23,7 @@ from driver.core import calls, user, bot
from driver.utils import bash from driver.utils import bash
from driver.database.dbpunish import is_gbanned_user from driver.database.dbpunish import is_gbanned_user
from driver.database.dblockchat import blacklisted_chats from driver.database.dblockchat import blacklisted_chats
from driver.database.dbqueue import add_active_chat, remove_active_chat, music_on, music_off from driver.database.dbqueue import add_active_chat, remove_active_chat, music_on
from config import BOT_USERNAME, IMG_5 from config import BOT_USERNAME, IMG_5
# youtube-dl stuff # youtube-dl stuff
from youtubesearchpython import VideosSearch from youtubesearchpython import VideosSearch
@ -200,7 +201,6 @@ async def play(c: Client, m: Message):
os.remove(image) os.remove(image)
except Exception as e: except Exception as e:
await suhu.delete() await suhu.delete()
await music_off(chat_id)
await remove_active_chat(chat_id) await remove_active_chat(chat_id)
await m.reply_text(f"🚫 error:\n\n» {e}") await m.reply_text(f"🚫 error:\n\n» {e}")
else: else:
@ -269,7 +269,6 @@ async def play(c: Client, m: Message):
os.remove(image) os.remove(image)
except Exception as ep: except Exception as ep:
await suhu.delete() await suhu.delete()
await music_off(chat_id)
await remove_active_chat(chat_id) await remove_active_chat(chat_id)
await m.reply_text(f"🚫 error: `{ep}`") await m.reply_text(f"🚫 error: `{ep}`")
@ -335,6 +334,5 @@ async def play(c: Client, m: Message):
os.remove(image) os.remove(image)
except Exception as ep: except Exception as ep:
await suhu.delete() await suhu.delete()
await music_off(chat_id)
await remove_active_chat(chat_id) await remove_active_chat(chat_id)
await m.reply_text(f"🚫 error: `{ep}`") await m.reply_text(f"🚫 error: `{ep}`")