mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 15:52:10 +00:00
This commit is contained in:
@@ -18,6 +18,7 @@ import re
|
|||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
|
from urllib.parse import quote_plus
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from logging import handlers
|
from logging import handlers
|
||||||
from pathlib import Path, PurePath
|
from pathlib import Path, PurePath
|
||||||
@@ -1973,8 +1974,6 @@ class DoSearchView(discord.ui.View):
|
|||||||
#emoji = await ctx.guild.fetch_emoji(id)
|
#emoji = await ctx.guild.fetch_emoji(id)
|
||||||
#button.emoji=1102174413887111189
|
#button.emoji=1102174413887111189
|
||||||
logger.info("Pressed")
|
logger.info("Pressed")
|
||||||
logger.info(button)
|
|
||||||
logger.info(interaction)
|
|
||||||
await interaction.response.edit_message(content = "You clicked the button!") # Send a message when the button is clicked
|
await interaction.response.edit_message(content = "You clicked the button!") # Send a message when the button is clicked
|
||||||
|
|
||||||
@discord.ui.button(label="Sprawdz czy istnieje", style=discord.ButtonStyle.danger, row=1)
|
@discord.ui.button(label="Sprawdz czy istnieje", style=discord.ButtonStyle.danger, row=1)
|
||||||
@@ -1982,8 +1981,6 @@ class DoSearchView(discord.ui.View):
|
|||||||
#emoji = await ctx.guild.fetch_emoji(id)
|
#emoji = await ctx.guild.fetch_emoji(id)
|
||||||
#button.emoji=1102174413887111189
|
#button.emoji=1102174413887111189
|
||||||
logger.info("Pressed")
|
logger.info("Pressed")
|
||||||
logger.info(button)
|
|
||||||
logger.info(interaction)
|
|
||||||
await interaction.response.edit_message(content = "You clicked the button!") # Send a message when the button is clicked
|
await interaction.response.edit_message(content = "You clicked the button!") # Send a message when the button is clicked
|
||||||
|
|
||||||
|
|
||||||
@@ -2003,7 +2000,14 @@ async def wyszukaj_linki_do_dokumentow(ctx):
|
|||||||
#4 zwroc 5 wyników od librariana
|
#4 zwroc 5 wyników od librariana
|
||||||
#5 przyciski przy każdym wierszu pozwalają sprawdzić czy plik istnieje na scihubie - jeśli tak podaje link do sciagniecia
|
#5 przyciski przy każdym wierszu pozwalają sprawdzić czy plik istnieje na scihubie - jeśli tak podaje link do sciagniecia
|
||||||
#6 ostatni wiersz to dalej, wróć, skasuj, zaciagnij kolejne wyniki (jeśli jest ich więcej niż 1000)
|
#6 ostatni wiersz to dalej, wróć, skasuj, zaciagnij kolejne wyniki (jeśli jest ich więcej niż 1000)
|
||||||
await ctx.send("This is a button!", view=DoSearchView()) # Send a message with our View class that contains the button
|
result_view = DoSearchView()
|
||||||
|
resulttab = ["r1", "r2", "r3", "r4", "r5"]
|
||||||
|
|
||||||
|
for i in range(0,4):
|
||||||
|
query = quote_plus(resulttab[i])
|
||||||
|
url = f'https://www.google.com/search?q={query}'
|
||||||
|
result_view.add_item(discord.ui.Button(label = resulttab[i], row = i),url=url)
|
||||||
|
await ctx.send("This is a button!", view=result_view) # Send a message with our View class that contains the button
|
||||||
|
|
||||||
|
|
||||||
# *================================== Run
|
# *================================== Run
|
||||||
|
|||||||
Reference in New Issue
Block a user