From 558a76a3af1b1127446023ebe944f66730d724ef Mon Sep 17 00:00:00 2001 From: nex Date: Sat, 11 Nov 2023 19:03:12 +0000 Subject: [PATCH] Prevent the embed growing too large --- cogs/other.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogs/other.py b/cogs/other.py index 33a01ff..dabcb08 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1957,6 +1957,12 @@ class OtherCog(commands.Cog): await msg.edit(content=content, embed=output, view=view) if self.ollama_locks[msg].is_set(): return await msg.edit(content="Aborted.", embed=output, view=None) + if len(output.description) >= 4000: + output.add_field( + name="Aborting early", + value="Output exceeded 4000 characters." + ) + break def get_time_spent(nanoseconds: int) -> str: hours, minutes, seconds = 0, 0, 0