Fixed achievement events #1.1.0.rc4
This commit is contained in:
parent
7318239b2d
commit
28944755ac
@ -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()
|
||||||
|
@ -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()
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user