From 3466c6ba7a91bc60a49fd4e666e628a694c0b8f3 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 4 Jul 2022 23:09:28 -0400 Subject: [PATCH] it says the thing when you do the search thing i dunno geuxto was complaining --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8699a7b..136123e 100644 --- a/main.py +++ b/main.py @@ -88,7 +88,9 @@ async def on_message(message): res = json.loads(requests.get(f"https://vid.puffyan.us/api/v1/search?q={'%20'.join(message.content.split(' ')[1:])}&pretty=1").text) res = [item for item in res if item["type"] == "video"] if message.content.split(' ')[0][-1] in list("012345"): - await q_vid(f"https://www.youtube.com/watch?v={res[int(message.content.split(' ')[0][-1])]['videoId']}") + v = res[int(message.content.split(' ')[0][-1])] + await q_vid(f"https://www.youtube.com/watch?v={v['videoId']}") + await message.channel.send(f"k, {v['title']}") return embed = discord.Embed(title="does this look right") for i, q in enumerate(res):