diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index 204cadd..9de9cab 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -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() diff --git a/payphone/cogs/mods/views.py b/payphone/cogs/mods/views.py index 84d0708..5faeec3 100644 --- a/payphone/cogs/mods/views.py +++ b/payphone/cogs/mods/views.py @@ -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 += (