fix(seautils): fall back to the embed description if answer_section is too long
This commit is contained in:
parent
54491cb9c9
commit
b27a3ee778
1 changed files with 4 additions and 1 deletions
|
@ -126,6 +126,9 @@ class SeaUtils(commands.Cog):
|
||||||
|
|
||||||
if 'ANSWER_SECTION' in response_data:
|
if 'ANSWER_SECTION' in response_data:
|
||||||
answer_section = "\n".join(response_data['ANSWER_SECTION'])
|
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)
|
embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False)
|
||||||
|
|
||||||
if 'AUTHORITY_SECTION' in response_data:
|
if 'AUTHORITY_SECTION' in response_data:
|
||||||
|
|
Loading…
Reference in a new issue