Skip to content

Commit

Permalink
feat: add guild_id to up and down votes on suggestion logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis committed Mar 11, 2024
1 parent 38216f2 commit 72c8bb2
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions suggestions/cogs/suggestion_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 72c8bb2

Please sign in to comment.