From 28944755ac1aab59b017e8cf77954cde050e99fe Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 16 Aug 2023 22:30:12 +0200 Subject: [PATCH] Fixed achievement events #1.1.0.rc4 --- .../achievements/events/achievement_on_reaction_add_event.py | 2 +- .../achievements/events/achievement_on_reaction_remove_event.py | 2 +- .../events/achievement_on_voice_state_update_event.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py index f489bb08..dad3a8f1 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py @@ -53,7 +53,7 @@ class AchievementOnReactionAddEvent(OnReactionAddABC): return 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 self._db.save_changes() diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py index 4efb5588..db953ed3 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py @@ -53,7 +53,7 @@ class AchievementOnReactionRemoveEvent(OnReactionRemoveABC): return 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 self._db.save_changes() diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py index 307d4e18..2d9417a1 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py @@ -50,6 +50,6 @@ class AchievementOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC): return 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)