Alert on existing truth
This commit is contained in:
parent
cb21202b83
commit
abae47be5f
1 changed files with 9 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue