aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shivansh-007 <[email protected]>2021-11-07 01:46:01 +0530
committerGravatar Shivansh-007 <[email protected]>2021-11-07 01:46:01 +0530
commit32381cdfebd33b39bb69019f174b070beb32c44a (patch)
treecd6d3ec0ca12e4fffca6adfe81a3943e509eb706
parentSHow thread parent name if linked message in thread (diff)
Explicitly show there is no message content
-rw-r--r--bot/exts/moderation/incidents.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py
index 18102587a..bdbce4acb 100644
--- a/bot/exts/moderation/incidents.py
+++ b/bot/exts/moderation/incidents.py
@@ -226,13 +226,12 @@ 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) if message.content else "[No Message Content]"
+ )
embed.set_footer(text=f"Message ID: {message.id}")
- if message.content:
- embed.add_field(
- name="Content",
- value=shorten_text(message.content)
- )
if message.attachments:
embed.set_image(url=message.attachments[0].url)