some fixes

This commit is contained in:
levina 2021-11-03 00:16:55 +07:00 committed by GitHub
parent 2f7770c7a2
commit a5c7085bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,9 +156,10 @@ async def play(_, m: Message):
) )
add_to_queue(chat_id, songname, dl, link, "Audio", 0) add_to_queue(chat_id, songname, dl, link, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_2}", photo=f"{IMG_2}",
caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({link})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {m.from_user.mention()}", caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({link})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {requester}",
reply_markup=keyboard, reply_markup=keyboard,
) )
else: else:
@ -184,9 +185,10 @@ async def play(_, m: Message):
chat_id, songname, ytlink, url, "Audio", 0 chat_id, songname, ytlink, url, "Audio", 0
) )
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_1}", photo=f"{IMG_1}",
caption=f"💡 **Track added to the queue**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {m.from_user.mention()}\n🔢 **At position »** `{pos}`", caption=f"💡 **Track added to the queue**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {requester}\n🔢 **At position »** `{pos}`",
reply_markup=keyboard, reply_markup=keyboard,
) )
else: else:
@ -200,9 +202,10 @@ async def play(_, m: Message):
) )
add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_2}", photo=f"{IMG_2}",
caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {m.from_user.mention()}", caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {requester}",
reply_markup=keyboard, reply_markup=keyboard,
) )
except Exception as ep: except Exception as ep:
@ -229,9 +232,10 @@ async def play(_, m: Message):
if chat_id in QUEUE: if chat_id in QUEUE:
pos = add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) pos = add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_1}", photo=f"{IMG_1}",
caption=f"💡 **Track added to the queue**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {m.from_user.mention()}\n🔢 **At position »** `{pos}`", caption=f"💡 **Track added to the queue**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {requester}\n🔢 **At position »** `{pos}`",
reply_markup=keyboard, reply_markup=keyboard,
) )
else: else:
@ -245,9 +249,10 @@ async def play(_, m: Message):
) )
add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_2}", photo=f"{IMG_2}",
caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {m.from_user.mention()}", caption=f"💡 **music streaming started.**\n\n🏷 **Name:** [{songname}]({url})\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {requester}",
reply_markup=keyboard, reply_markup=keyboard,
) )
except Exception as ep: except Exception as ep:
@ -348,9 +353,10 @@ async def stream(_, m: Message):
if chat_id in QUEUE: if chat_id in QUEUE:
pos = add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0) pos = add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_1}", photo=f"{IMG_1}",
caption=f"💡 **Track added to the queue**\n\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {m.from_user.mention()}\n🔢 **At position »** `{pos}`", caption=f"💡 **Track added to the queue**\n\n💭 **Chat:** `{chat_id}`\n🎧 **Request by:** {requester}\n🔢 **At position »** `{pos}`",
reply_markup=keyboard, reply_markup=keyboard,
) )
else: else:
@ -364,9 +370,10 @@ async def stream(_, m: Message):
) )
add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0) add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0)
await suhu.delete() await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
await m.reply_photo( await m.reply_photo(
photo=f"{IMG_2}", photo=f"{IMG_2}",
caption=f"💡 **[Radio live]({link}) stream started.**\n\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {m.from_user.mention()}", caption=f"💡 **[Radio live]({link}) stream started.**\n\n💭 **Chat:** `{chat_id}`\n💡 **Status:** `Playing`\n🎧 **Request by:** {requester}",
reply_markup=keyboard, reply_markup=keyboard,
) )
except Exception as ep: except Exception as ep: