From 7f064362528f6dd966c08511cf7d3826979e65da Mon Sep 17 00:00:00 2001 From: osmarks Date: Thu, 29 Aug 2024 21:16:12 +0100 Subject: [PATCH] Remove horrible bug --- src/sentience.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sentience.py b/src/sentience.py index dc683c5..7b3ab67 100644 --- a/src/sentience.py +++ b/src/sentience.py @@ -41,8 +41,6 @@ class Sentience(commands.Cog): for prefix in PREFIXES: if content.startswith(prefix): content = content.removeprefix(prefix).lstrip() - if content == "wipe_memory": - prompt = [] if not content and message.embeds: content = message.embeds[0].title elif not content and message.attachments: @@ -105,7 +103,12 @@ class Sentience(commands.Cog): # generate response generation = await util.generate(self.session, gollark_data + conversation, stop=["\n["]) - generation = generation.strip().strip("[\n ") + while True: + new_generation = generation.strip().strip("[\n ") + new_generation = new_generation.removesuffix("---") + if new_generation == generation: + break + generation = new_generation if generation: await ctx.send(AUTOGOLLARK_MARKER + generation)