Fix bug with searching pdfs and reduced max scope and nodes

Rene Teigen 1 year ago
parent f8972ec3bb
commit e37f4024c8

@ -837,7 +837,7 @@ class Commands(discord.Cog, name="Commands"):
description="How many top links to use for context",
required=False,
input_type=discord.SlashCommandOptionType.integer,
max_value=8,
max_value=6,
min_value=1,
)
@discord.option(
@ -845,7 +845,7 @@ class Commands(discord.Cog, name="Commands"):
description="The higher the number, the more accurate the results, but more expensive",
required=False,
input_type=discord.SlashCommandOptionType.integer,
max_value=10,
max_value=4,
min_value=1,
)
@discord.guild_only()

@ -57,7 +57,7 @@ class Search:
async with session.get(url) as response:
if response.status == 200:
data = await response.read()
f = tempfile.NamedTemporaryFile(delete=False)
f = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
f.write(data)
f.close()
else:

Loading…
Cancel
Save