Fixed achievement events #1.1.0.rc4

This commit is contained in:
Sven Heidemann 2023-08-16 22:30:12 +02:00
parent 7318239b2d
commit 28944755ac
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ class AchievementOnReactionAddEvent(OnReactionAddABC):
return return
server = self._servers.get_server_by_discord_id(user.guild.id) server = self._servers.get_server_by_discord_id(user.guild.id)
user = self._users.get_user_by_discord_id_and_server_id(user.author.id, server.id) user = self._users.get_user_by_discord_id_and_server_id(user.id, server.id)
user.reaction_count += 1 user.reaction_count += 1
self._db.save_changes() self._db.save_changes()

View File

@ -53,7 +53,7 @@ class AchievementOnReactionRemoveEvent(OnReactionRemoveABC):
return return
server = self._servers.get_server_by_discord_id(user.guild.id) server = self._servers.get_server_by_discord_id(user.guild.id)
user = self._users.get_user_by_discord_id_and_server_id(user.author.id, server.id) user = self._users.get_user_by_discord_id_and_server_id(user.id, server.id)
user.reaction_count -= 1 user.reaction_count -= 1
self._db.save_changes() self._db.save_changes()

View File

@ -50,6 +50,6 @@ class AchievementOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
return return
server = self._servers.get_server_by_discord_id(member.guild.id) server = self._servers.get_server_by_discord_id(member.guild.id)
user = self._users.get_user_by_discord_id_and_server_id(member.author.id, server.id) user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id)
await self._achievements.validate_achievements_for_user(user) await self._achievements.validate_achievements_for_user(user)