From b27a3ee7788fb89ea571a73aecf2380189303d81 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Tue, 28 May 2024 18:46:32 -0400 Subject: [PATCH] fix(seautils): fall back to the embed description if answer_section is too long --- seautils/seautils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/seautils/seautils.py b/seautils/seautils.py index 85df38e..ce9c64e 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -126,7 +126,10 @@ class SeaUtils(commands.Cog): if 'ANSWER_SECTION' in response_data: answer_section = "\n".join(response_data['ANSWER_SECTION']) - embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False) + if len(answer_section) > 1024: + embed.description = answer_section + else: + embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False) if 'AUTHORITY_SECTION' in response_data: authority_section = "\n".join(response_data['AUTHORITY_SECTION'])