Skip to content

Commit

Permalink
Add channel and empty content indication to reported messages
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanC committed Mar 2, 2025
1 parent 55a7f8b commit f951050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ async def CommandReport(ctx: GatewayContext, msg: Message) -> None:
return

fields: list[dict[str, str | bool]] = [
{"name": "Channel", "value": (await msg.fetch_channel()).mention},
{"name": "Sent", "value": TimeRelative(msg.created_at)},
{"name": "Reported", "value": TimeRelative(ctx.interaction.created_at)},
]
Expand Down Expand Up @@ -295,7 +296,7 @@ async def CommandReport(ctx: GatewayContext, msg: Message) -> None:
title="Reported Message",
url=msg.make_link(msg.guild_id),
color=Colors.DiscordYellow.value,
description=None if not (content := msg.content) else f">>> {content}",
description="[Empty]" if not (content := msg.content) else f">>> {content}",
fields=fields,
author=await ExpandUser(msg.author, format=False),
authorIcon=GetUserAvatar(msg.author),
Expand Down

0 comments on commit f951050

Please sign in to comment.