diff --git a/kdb-bot/src/modules/auto_role/helper/auto_role_reaction_handler.py b/kdb-bot/src/modules/auto_role/helper/auto_role_reaction_handler.py index 47ab3778..a51d1f6c 100644 --- a/kdb-bot/src/modules/auto_role/helper/auto_role_reaction_handler.py +++ b/kdb-bot/src/modules/auto_role/helper/auto_role_reaction_handler.py @@ -32,9 +32,9 @@ class AutoRoleReactionHandler: return guild = self._bot.get_guild(payload.guild_id) - user = guild.get_member(payload.user_id) + user = guild.get_member(payload.id) if user is None: - self._logger.warn(__name__, f"User {payload.user_id} in {guild.name} not found - skipping") + self._logger.warn(__name__, f"User {payload.id} in {guild.name} not found - skipping") return if user.bot: diff --git a/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py b/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py index 54050851..d8283652 100644 --- a/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py +++ b/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py @@ -52,12 +52,12 @@ class BaseOnVoiceStateUpdateEventScheduledEventBonus(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.id, server.server_id) - if active_event.participants.any(lambda x: x.user_id == user.user_id): + user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id) + if active_event.participants.any(lambda x: x.id == user.id): self._logger.debug(__name__, f"Module {type(self)} stopped") return - settings: BaseServerSettings = self._base_helper.get_config(server.discord_server_id) + settings: BaseServerSettings = self._base_helper.get_config(server.discord_id) user.xp += settings.xp_per_event_participation self._users.update_user(user) self._db.save_changes() diff --git a/kdb-bot/src/modules/base/helper/base_reaction_handler.py b/kdb-bot/src/modules/base/helper/base_reaction_handler.py index 9fb4f89e..565dee6b 100644 --- a/kdb-bot/src/modules/base/helper/base_reaction_handler.py +++ b/kdb-bot/src/modules/base/helper/base_reaction_handler.py @@ -36,9 +36,9 @@ class BaseReactionHandler: self._logger.trace(__name__, f"Handle reaction {payload} {r_type}") guild = self._bot.get_guild(payload.guild_id) - member = guild.get_member(payload.user_id) + member = guild.get_member(payload.id) if member is None: - self._logger.warn(__name__, f"User {payload.user_id} in {guild.name} not found - skipping") + self._logger.warn(__name__, f"User {payload.id} in {guild.name} not found - skipping") return try: