From a5c7085bbaf3484f06a6484f2c81bea692983f5b Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Wed, 3 Nov 2021 00:16:55 +0700 Subject: [PATCH] some fixes --- program/music.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/program/music.py b/program/music.py index 3c8e531..9dc59fa 100644 --- a/program/music.py +++ b/program/music.py @@ -156,9 +156,10 @@ async def play(_, m: Message): ) add_to_queue(chat_id, songname, dl, link, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) else: @@ -184,9 +185,10 @@ async def play(_, m: Message): chat_id, songname, ytlink, url, "Audio", 0 ) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) else: @@ -200,9 +202,10 @@ async def play(_, m: Message): ) add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) except Exception as ep: @@ -229,9 +232,10 @@ async def play(_, m: Message): if chat_id in QUEUE: pos = add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) else: @@ -245,9 +249,10 @@ async def play(_, m: Message): ) add_to_queue(chat_id, songname, ytlink, url, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) except Exception as ep: @@ -348,9 +353,10 @@ async def stream(_, m: Message): if chat_id in QUEUE: pos = add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) else: @@ -364,9 +370,10 @@ async def stream(_, m: Message): ) add_to_queue(chat_id, "Radio", livelink, link, "Audio", 0) await suhu.delete() + requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})" await m.reply_photo( 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, ) except Exception as ep: