fix(bot): 🐛 Message logs not working.

This commit is contained in:
Nyeki.py
2024-10-18 14:13:40 -03:00
parent 71afe924e0
commit 77d34beb32
2 changed files with 11 additions and 4 deletions
+4 -2
View File
@@ -100,7 +100,9 @@ class ReportView(discord.ui.View):
self.add_item(actions)
self.add_item(
discord.ui.Button(label=f"Remaining: {remaining_reports}", disabled=True, row=2)
discord.ui.Button(
label=f"Remaining: {remaining_reports}", disabled=True, row=2
)
)
@discord.ui.button(label="Message Logs", style=discord.ButtonStyle.gray, row=2)
@@ -137,7 +139,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}:"
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"}:"
for content in message.contents:
current_block += (