fix(seautils): fall back to the embed description if answer_section is too long

This commit is contained in:
Seaswimmer 2024-05-28 18:46:32 -04:00
parent 54491cb9c9
commit b27a3ee778
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -126,6 +126,9 @@ class SeaUtils(commands.Cog):
if 'ANSWER_SECTION' in response_data:
answer_section = "\n".join(response_data['ANSWER_SECTION'])
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: