Fix bug with searching pdfs and reduced max scope and nodes

Rene Teigen 2 years ago
parent f8972ec3bb
commit e37f4024c8

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

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

Loading…
Cancel
Save