diff options
author | 2021-11-07 01:39:04 +0530 | |
---|---|---|
committer | 2021-11-07 01:39:58 +0530 | |
commit | 689850fd99737ab742dedf265cebbc19333535e1 (patch) | |
tree | 921dcbdee7a079093ff0183cd0401f06bc3841ce | |
parent | Merge branch 'main' into feature/enhance-incidents (diff) |
Add no message content handling
-rw-r--r-- | bot/exts/moderation/incidents.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index c531f4902..87a6579f7 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -224,12 +224,14 @@ async def make_message_link_embed(ctx: Context, message_link: str) -> Optional[d ), timestamp=message.created_at ) - embed.add_field( - name="Content", - value=shorten_text(message.content) - ) embed.set_footer(text=f"Message ID: {message.id}") + if message.content: + embed.add_field( + name="Content", + value=shorten_text(message.content) + ) + return embed |