From 2faf3144676caeb012e88f37af8719f450962fda Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Fri, 25 Oct 2024 23:51:37 -0300 Subject: [PATCH] feat(bot): :sparkles: Add masks info to message logs. --- payphone/cogs/mods/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/payphone/cogs/mods/views.py b/payphone/cogs/mods/views.py index 41e36cf..42e0506 100644 --- a/payphone/cogs/mods/views.py +++ b/payphone/cogs/mods/views.py @@ -82,7 +82,9 @@ class ReportView(discord.ui.View): lambda rs: rs.user_id == report.reported_by_id, report.call.call_rss ).channel_id - profiles_mapping = {rs.profile_id: rs.profile for rs in report.call.call_rss} + profiles_to_relationship_mapping = { + rs.profile_id: rs for rs in report.call.call_rss + } last_user_id = None last_channel_id = None @@ -98,7 +100,7 @@ class ReportView(discord.ui.View): logs.append(current_block) current_block = "" - current_block += f"{"+" if message.channel_id == reporter_channel_id else "-"} {profiles_mapping[message.profile_id].name if message.profile_id in profiles_mapping else "Unknown"}:" + current_block += f"{"+" if message.channel_id == reporter_channel_id else "-"} {f"{profiles_to_relationship_mapping[message.profile_id].profile.name}{f" (Masked as {profiles_to_relationship_mapping[message.profile_id].mask_name})" if profiles_to_relationship_mapping[message.profile_id].is_masked else ""}" if message.profile_id in profiles_to_relationship_mapping else "Unknown"}:" for content in message.contents: current_block += (