diff --git a/kdb-bot/src/modules/base/events/base_on_member_join_event.py b/kdb-bot/src/modules/base/events/base_on_member_join_event.py index 72dcebce21..0e4832211a 100644 --- a/kdb-bot/src/modules/base/events/base_on_member_join_event.py +++ b/kdb-bot/src/modules/base/events/base_on_member_join_event.py @@ -77,10 +77,10 @@ class BaseOnMemberJoinEvent(OnMemberJoinABC): try: server = self._servers.get_server_by_discord_id(member.guild.id) - user = self._users.find_user_by_discord_id_and_server_id(member.id, server.server_id) if user is not None: self._user_joins.add_user_joined_server(UserJoinedServer(user, datetime.now())) + self._db.save_changes() return self._logger.debug(__name__, f'Add user: {member.id}') diff --git a/kdb-bot/src/modules/level/service/level_service.py b/kdb-bot/src/modules/level/service/level_service.py index f47102b9dc..eb9756ab27 100644 --- a/kdb-bot/src/modules/level/service/level_service.py +++ b/kdb-bot/src/modules/level/service/level_service.py @@ -88,5 +88,6 @@ class LevelService: user = self._users.find_user_by_discord_id_and_server_id(member.id, server.server_id) if user is None: self._logger.warn(__name__, f'User not found {member.guild.name}@{member.name}') + return await self.set_level(user)