some fixes

This commit is contained in:
levina 2022-02-10 10:20:40 +07:00 committed by GitHub
parent 9f3ab6f855
commit 9c795c68c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,5 @@
import os
from cache.admins import admins from cache.admins import admins
from driver.core import calls, bot from driver.core import calls, bot
from pyrogram import Client, filters from pyrogram import Client, filters
@ -74,9 +76,10 @@ async def skip(c: Client, m: Message):
reply_markup=InlineKeyboardMarkup(buttons), reply_markup=InlineKeyboardMarkup(buttons),
caption=f"⏭ **Skipped** to the next track.\n\n🗂 **Name:** [{op[0]}]({op[1]})\n💭 **Chat:** `{chat_id}`\n🧸 **Request by:** {requester}", caption=f"⏭ **Skipped** to the next track.\n\n🗂 **Name:** [{op[0]}]({op[1]})\n💭 **Chat:** `{chat_id}`\n🧸 **Request by:** {requester}",
) )
os.remove(image)
else: else:
skip = m.text.split(None, 1)[1] skip = m.text.split(None, 1)[1]
OP = "🗑 **removed song from queue:**" track = "🗑 **removed song from queue:**"
if chat_id in QUEUE: if chat_id in QUEUE:
items = [int(x) for x in skip.split(" ") if x.isdigit()] items = [int(x) for x in skip.split(" ") if x.isdigit()]
items.sort(reverse=True) items.sort(reverse=True)
@ -84,12 +87,12 @@ async def skip(c: Client, m: Message):
if x == 0: if x == 0:
pass pass
else: else:
hm = await skip_item(chat_id, x) data = await skip_item(chat_id, x)
if hm == 0: if data == 0:
pass pass
else: else:
OP = OP + "\n" + f"**#{x}** - {hm}" track = track + "\n" + f"**#{x}** - {hm}"
await m.reply(OP) await m.reply(track)
@Client.on_message( @Client.on_message(