Prevent the embed growing too large

This commit is contained in:
Nexus 2023-11-11 19:03:12 +00:00
parent e936f9a4e3
commit 558a76a3af
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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