Fixed some on member join stuff
This commit is contained in:
parent
d3279eb7c7
commit
f5a71a8450
@ -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}')
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user