fix(seautils): fall back to the embed description if answer_section is too long
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 26s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 37s

This commit is contained in:
Seaswimmer 2024-05-28 18:46:32 -04:00
parent 54491cb9c9
commit b27a3ee778
Signed by: 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: