From ab422b41378dc2d960c061f1566a302730a45d46 Mon Sep 17 00:00:00 2001 From: Paillat Date: Mon, 6 Mar 2023 23:28:29 +0100 Subject: [PATCH] Update makeprompt.py --- code/makeprompt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/makeprompt.py b/code/makeprompt.py index c4064de..eafa13a 100644 --- a/code/makeprompt.py +++ b/code/makeprompt.py @@ -47,11 +47,12 @@ async def chat_process(self, message): channels = [] try: cp.execute("SELECT * FROM channels WHERE guild_id = ?", (message.guild.id,)) + data = cp.fetchone() if premium: #for 5 times, we get c.fetchone()[1] to c.fetchone()[5] and we add it to the channels list, each time with try except - for i in range(5): + for i in range(1, 6): #we use the i variable to get the channel id - try: channels.append(str(cp.fetchone()[i+1])) + try: channels.append(str(data[i])) except: pass except: channels = []