From abae47be5f5ffd47921ad0d3d5258cd1325f84c8 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 4 Jun 2024 01:49:00 +0100 Subject: [PATCH] Alert on existing truth --- src/cogs/ollama.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index b0947c5..25170ac 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -1017,7 +1017,7 @@ class Ollama(commands.Cog): " words of truth to the american people in order to make america great again. After reading through all" " of your previous truth posts, you should generate another one, ready to be posted, " "under 4000 characters. Write only the content to be posted, do not include any pleasantries." - " Write using the style of a twitter or facebook post." + " Write using the style of a twitter or facebook post. Do not repeat a previous post." ) channel = discord.utils.get(ctx.guild.text_channels, name="spam") oldest = discord.Object(1229487300505894964) @@ -1064,6 +1064,14 @@ class Ollama(commands.Cog): if (time.time() - last_edit) >= 2.5: await msg.edit(embed=embed) last_edit = time.time() + + for _message in self.history.get_history(thread_id): + if _message["content"] == embed.description: + embed.add_field( + name="Repeated truth :(", + value="This truth was already truthed. Shit AI." + ) + break embed.set_footer( text="Finished generating truth based off of {:,} messages, using server {!r} | {!s}".format( len(messages),