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,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'])
|
||||
|
|
Loading…
Reference in a new issue