From d20b9042d39e5dbab57a3595f2eea0129f3fd945 Mon Sep 17 00:00:00 2001 From: Paillat Date: Tue, 29 Nov 2022 15:18:13 +0100 Subject: [PATCH] Update code.py --- code/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/code.py b/code/code.py index 9b7c96c..42cb55c 100644 --- a/code/code.py +++ b/code/code.py @@ -100,11 +100,11 @@ async def advanced(ctx, max_tokens=None, temperature=None, frequency_penalty=Non #check if the guild is in the database debug(f"The user {ctx.author} ran the advanced command in the channel {ctx.channel} of the guild {ctx.guild}, named {ctx.guild.name}") c.execute("SELECT * FROM data WHERE guild_id = ?", (ctx.guild.id,)) - if c.fetchone() is None: + if not c.fetchone(): await ctx.respond("This server is not setup, please run /setup", ephemeral=True) return #save the current settings into a list: is_active, max_tokens, temperature, frequency_penalty, presence_penalty, prompt_size, prompt_prefix - debug(f"Current settings: {c.fetchone()}") + debug(f"Current settings: {c.fetchone()[4]}") current_settings = [c.fetchone()[4], c.fetchone()[5], c.fetchone()[6], c.fetchone()[7], c.fetchone()[9]] #get the new settings if max_tokens is None: