fix(bot): 🐛 Message logs not working.
This commit is contained in:
@@ -463,7 +463,9 @@ class Calls(base.Cog):
|
||||
)
|
||||
|
||||
await self.bot.redis.srem(
|
||||
constants.CHANNELS_ONCALL_SET, str(channel_id), str(other_channel.id)
|
||||
constants.CHANNELS_ONCALL_SET,
|
||||
[str(channel_id)]
|
||||
+ ([str(other_channel.id)] if other_channel is not None else []),
|
||||
)
|
||||
|
||||
if other_channel is not None:
|
||||
@@ -481,7 +483,10 @@ class Calls(base.Cog):
|
||||
|
||||
channel.call = None
|
||||
|
||||
await models.Channel.bulk_update([channel] + ([other_channel] if other_channel is not None else []), ["call_id"])
|
||||
await models.Channel.bulk_update(
|
||||
[channel] + ([other_channel] if other_channel is not None else []),
|
||||
["call_id"],
|
||||
)
|
||||
|
||||
call.ended_at = datetime.now(timezone.utc)
|
||||
await call.save()
|
||||
|
||||
@@ -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 += (
|
||||
|
||||
Reference in New Issue
Block a user