From b8d6c63227b6e77abf285a88d4434d2337b6c96a Mon Sep 17 00:00:00 2001 From: Migatu Date: Tue, 2 Apr 2024 14:13:55 +0200 Subject: [PATCH] aa --- bot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 1ff62e5..b48f853 100644 --- a/bot.py +++ b/bot.py @@ -2019,10 +2019,13 @@ async def wyszukaj_linki_do_dokumentow(ctx): resulttab.append(str(item["title"])) item_link = "https://sci-hub.se/" + str(item["DOI"]) resultlink.append(item_link) + print(len(resulttab)) for i in range(1, min(5,len(resulttab))): - query = quote_plus(resulttab[i-1]) - result_view.add_item(discord.ui.Button(label = resulttab[i-1], row = i,url=resultlink[i])) - await ctx.send("This is a button!", view=result_view) # Send a message with our View class that contains the button + print(i) + url = quote_plus(resultlink[i-1]) + result_view.add_item(discord.ui.Button(label = resulttab[i-1], row = i,url=url)) + labelka = "Wyniki wyszukiwania dla: " + str(query)[30:] # ile znaleziono artykułów w ogóle, ile zostało po refine + await ctx.send(labelka, view=result_view) # Send a message with our View class that contains the button # *================================== Run