fix(seautils): fixed the wrong thing lmao
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 26s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 38s

This commit is contained in:
Seaswimmer 2024-05-28 19:26:07 -04:00
parent 7f46d6accc
commit 50094b85fc
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -148,16 +148,18 @@ class SeaUtils(commands.Cog):
if authority not in authorities:
authorities.append(authority)
question_section = "\n".join(questions)
embed.add_field(name="Question Section", value=f"{cf.box(question_section)}", inline=False)
if questions:
question_section = "\n".join(questions)
embed.add_field(name="Question Section", value=f"{cf.box(question_section)}", inline=False)
answer_section = "\n".join(answers)
if len(answer_section) > 1024:
embed.description = cf.warning("Answer section is too long to fit within embed field, falling back to description.") + cf.box(answer_section)
else:
embed.add_field(name="Answer Section", value=f"{cf.box(answer_section)}", inline=False)
if answers:
answer_section = "\n".join(answers)
if len(answer_section) > 1024:
embed.description = cf.warning("Answer section is too long to fit within embed field, falling back to description.") + cf.box(answer_section)
else:
embed.add_field(name="Answer Section", value=f"{cf.box(answer_section)}", inline=False)
if not len(authorities) == 0:
if authorities:
authority_section = "\n".join(authorities)
embed.add_field(name="Authority Section", value=f"{cf.box(authority_section)}", inline=False)
await ctx.send(embed=embed)