Fix embed description check
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s

This commit is contained in:
Nexus 2024-06-03 00:49:07 +01:00
parent 315dd82974
commit cb21202b83
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1026,7 +1026,7 @@ class Ollama(commands.Cog):
break
if message.author.id == 1101439218334576742 and len(message.embeds):
embed = message.embeds[0]
if embed.description.strip() == "NEW TRUTH":
if not embed.description or embed.description.strip() == "NEW TRUTH":
continue
if embed.type == "rich" and embed.colour and embed.colour.value == 0x5448EE:
self.history.add_message(thread_id, "assistant", embed.description)