From 573a8260455db5f56abcbd6cc2c719b731051d35 Mon Sep 17 00:00:00 2001 From: flaree Date: Tue, 21 Jan 2025 12:15:51 +0000 Subject: [PATCH 1/2] [admin] correctly log blacklist add and removes --- ballsdex/packages/admin/blacklist.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ballsdex/packages/admin/blacklist.py b/ballsdex/packages/admin/blacklist.py index f50ef70e..a2760d3a 100644 --- a/ballsdex/packages/admin/blacklist.py +++ b/ballsdex/packages/admin/blacklist.py @@ -53,11 +53,11 @@ async def blacklist_add( else: interaction.client.blacklist.add(user.id) await interaction.response.send_message("User is now blacklisted.", ephemeral=True) - await log_action( - f"{interaction.user} blacklisted {user} ({user.id})" - f" for the following reason: {reason}.", - interaction.client, - ) + await log_action( + f"{interaction.user} blacklisted {user} ({user.id})" + f" for the following reason: {reason}.", + interaction.client, + ) @app_commands.command(name="remove") @app_commands.checks.has_any_role(*settings.root_role_ids, *settings.admin_role_ids) @@ -94,10 +94,10 @@ async def blacklist_remove( await interaction.response.send_message( "User is now removed from blacklist.", ephemeral=True ) - await log_action( - f"{interaction.user} removed blacklist for user {user} ({user.id}).\nReason: {reason}", - interaction.client, - ) + await log_action( + f"{interaction.user} removed blacklist for user {user} ({user.id}).\nReason: {reason}", + interaction.client, + ) @app_commands.command(name="info") async def blacklist_info( @@ -225,11 +225,11 @@ async def blacklist_add_guild( else: interaction.client.blacklist_guild.add(guild.id) await interaction.response.send_message("Guild is now blacklisted.", ephemeral=True) - await log_action( - f"{interaction.user} blacklisted the guild {guild}({guild.id}) " - f"for the following reason: {reason}.", - interaction.client, - ) + await log_action( + f"{interaction.user} blacklisted the guild {guild}({guild.id}) " + f"for the following reason: {reason}.", + interaction.client, + ) @app_commands.command(name="remove") @app_commands.checks.has_any_role(*settings.root_role_ids, *settings.admin_role_ids) From abc8d3bee5f1c75bda30f8fcb76a106285e63c15 Mon Sep 17 00:00:00 2001 From: flaree Date: Tue, 21 Jan 2025 12:32:58 +0000 Subject: [PATCH 2/2] appease precommit --- ballsdex/packages/admin/blacklist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ballsdex/packages/admin/blacklist.py b/ballsdex/packages/admin/blacklist.py index a2760d3a..a1e55b45 100644 --- a/ballsdex/packages/admin/blacklist.py +++ b/ballsdex/packages/admin/blacklist.py @@ -95,7 +95,8 @@ async def blacklist_remove( "User is now removed from blacklist.", ephemeral=True ) await log_action( - f"{interaction.user} removed blacklist for user {user} ({user.id}).\nReason: {reason}", + f"{interaction.user} removed blacklist for user {user} ({user.id})." + f"\nReason: {reason}", interaction.client, )