Compare commits
No commits in common. "cfd5f7b19c8862f7e9c3ee9fc8dd8dadeea1251a" and "efb292ca10f90fb0ad144af57e6b2e09a7ed2565" have entirely different histories.
cfd5f7b19c
...
efb292ca10
1 changed files with 5 additions and 1 deletions
|
@ -115,14 +115,17 @@ class Issues(commands.Cog):
|
||||||
words = value.split()
|
words = value.split()
|
||||||
split_value = []
|
split_value = []
|
||||||
current_part = ""
|
current_part = ""
|
||||||
|
|
||||||
for word in words:
|
for word in words:
|
||||||
if len(current_part) + len(word) + 1 <= 1024:
|
if len(current_part) + len(word) + 1 <= 1024:
|
||||||
current_part += word + " "
|
current_part += word + " "
|
||||||
else:
|
else:
|
||||||
split_value.append(current_part.strip())
|
split_value.append(current_part.strip())
|
||||||
current_part = word + " "
|
current_part = word + " "
|
||||||
|
|
||||||
if current_part:
|
if current_part:
|
||||||
split_value.append(current_part.strip())
|
split_value.append(current_part.strip())
|
||||||
|
|
||||||
for i, part in enumerate(split_value):
|
for i, part in enumerate(split_value):
|
||||||
embed.add_field(name=title if i == 0 else "\u200b", value=part, inline=False)
|
embed.add_field(name=title if i == 0 else "\u200b", value=part, inline=False)
|
||||||
else:
|
else:
|
||||||
|
@ -218,6 +221,7 @@ class Issues(commands.Cog):
|
||||||
if self.response.value is not None:
|
if self.response.value is not None:
|
||||||
embed.add_field(name=f"Response from {interaction.user.name}", value=self.response.value, inline=False)
|
embed.add_field(name=f"Response from {interaction.user.name}", value=self.response.value, inline=False)
|
||||||
for field in embed.fields:
|
for field in embed.fields:
|
||||||
|
if field.name != "\u200b":
|
||||||
field_names.append(field.name)
|
field_names.append(field.name)
|
||||||
field_values.append(field.value)
|
field_values.append(field.value)
|
||||||
await message.edit(embed=embed, view=None)
|
await message.edit(embed=embed, view=None)
|
||||||
|
|
Loading…
Reference in a new issue