Skip to content

Commit

Permalink
Fix karma checkpost calulating karma wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
jackra1n committed Jan 26, 2024
1 parent f14b2bb commit ff23f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/cogs/karma.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ async def check_post(self, ctx: commands.Context, post_id: int):

old_upvotes = post['upvotes']
old_downvotes = post['downvotes']
karma_difference = (old_upvotes - upvotes) + (old_downvotes - downvotes)
karma_difference = (upvotes - old_upvotes) + (downvotes - old_downvotes)

await self.bot.db.execute(UPDATE_KARMA_QUERY, message.author.id, message.guild.id, karma_difference)
await self.bot.db.execute(
Expand Down

0 comments on commit ff23f76

Please sign in to comment.