This commit is contained in:
levina 2021-10-28 22:20:10 +07:00 committed by GitHub
parent 2d56eadf02
commit 336cc8c351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ def ytsearch(query):
for r in search.result()["result"]: for r in search.result()["result"]:
ytid = r['id'] ytid = r['id']
if len(r['title']) > 34: if len(r['title']) > 34:
songname = r['title'][:45] + "..." songname = r['title'][:50] + "..."
else: else:
songname = r['title'] songname = r['title']
url = f"https://www.youtube.com/watch?v={ytid}" url = f"https://www.youtube.com/watch?v={ytid}"
@ -70,9 +70,9 @@ async def play(client, m: Message):
link = replied.link link = replied.link
if replied.audio: if replied.audio:
if replied.audio.title: if replied.audio.title:
songname = replied.audio.title[:45] + "..." songname = replied.audio.title[:50] + "..."
else: else:
songname = replied.audio.file_name[:45] + "..." songname = replied.audio.file_name[:50] + "..."
elif replied.voice: elif replied.voice:
songname = "Voice Note" songname = "Voice Note"
if chat_id in QUEUE: if chat_id in QUEUE: