mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
Fixed too long embed eror
This commit is contained in:
@@ -25,7 +25,10 @@ class MyModal(discord.ui.Modal):
|
|||||||
embed.add_field(name="Guild", value=self.message.guild.name, inline=True)
|
embed.add_field(name="Guild", value=self.message.guild.name, inline=True)
|
||||||
history = await self.message.channel.history(limit=5).flatten()
|
history = await self.message.channel.history(limit=5).flatten()
|
||||||
for msg in history:
|
for msg in history:
|
||||||
embed.add_field(name="Message", value=msg.content, inline=False)
|
if len(msg.content) > 1023:
|
||||||
|
embed.add_field(name="Message", value=msg.content[:1023], inline=False)
|
||||||
|
else:
|
||||||
|
embed.add_field(name="Message", value=msg.content, inline=False)
|
||||||
await webhook.send(embed=embed)
|
await webhook.send(embed=embed)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
debug(e)
|
debug(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user