From 72c8bb27a0a328b848fc0e9851c1bc6dce45a244 Mon Sep 17 00:00:00 2001 From: skelmis Date: Mon, 11 Mar 2024 17:54:16 +1300 Subject: [PATCH] feat: add guild_id to up and down votes on suggestion logs --- suggestions/cogs/suggestion_cog.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/suggestions/cogs/suggestion_cog.py b/suggestions/cogs/suggestion_cog.py index 98ab47c..6f83317 100644 --- a/suggestions/cogs/suggestion_cog.py +++ b/suggestions/cogs/suggestion_cog.py @@ -84,7 +84,10 @@ async def suggestion_up_vote( ) logger.debug( f"Member {member_id} modified their vote on {suggestion_id} to a up vote", - extra_metadata={"suggestion_id": suggestion_id}, + extra_metadata={ + "suggestion_id": suggestion_id, + "guild_id": inter.guild_id, + }, ) else: suggestion.up_voted_by.add(member_id) @@ -98,7 +101,10 @@ async def suggestion_up_vote( ) logger.debug( f"Member {member_id} up voted {suggestion_id}", - extra_metadata={"suggestion_id": suggestion_id}, + extra_metadata={ + "suggestion_id": suggestion_id, + "guild_id": inter.guild_id, + }, ) await update_suggestion_message(suggestion=suggestion, bot=self.bot) @@ -146,7 +152,10 @@ async def suggestion_down_vote( ) logger.debug( f"Member {member_id} modified their vote on {suggestion_id} to a down vote", - extra_metadata={"suggestion_id": suggestion_id}, + extra_metadata={ + "suggestion_id": suggestion_id, + "guild_id": inter.guild_id, + }, ) else: suggestion.down_voted_by.add(member_id) @@ -160,7 +169,10 @@ async def suggestion_down_vote( ) logger.debug( f"Member {member_id} down voted {suggestion_id}", - extra_metadata={"suggestion_id": suggestion_id}, + extra_metadata={ + "suggestion_id": suggestion_id, + "guild_id": inter.guild_id, + }, ) await update_suggestion_message(suggestion=suggestion, bot=self.bot)