Fixed vc_state_update #166

This commit is contained in:
Sven Heidemann 2023-01-11 17:17:50 +01:00
parent b89fa12ec6
commit b80958e3ab
2 changed files with 2 additions and 3 deletions

View File

@ -94,7 +94,7 @@ class UserJoinedVoiceChannelRepositoryService(UserJoinedVoiceChannelRepositoryAB
) )
def find_active_user_joined_voice_channels_by_user_id(self, user_id: int) -> List[Optional[UserJoinedVoiceChannel]]: def find_active_user_joined_voice_channels_by_user_id(self, user_id: int) -> List[Optional[UserJoinedVoiceChannel]]:
self._logger.trace(__name__, f'Send SQL command: {UserJoinedVoiceChannel.get_select_by_user_id_string(user_id)}') self._logger.trace(__name__, f'Send SQL command: {UserJoinedVoiceChannel.get_select_active_by_user_id_string(user_id)}')
result = List(UserJoinedVoiceChannel) result = List(UserJoinedVoiceChannel)
db_results = self._context.select(UserJoinedVoiceChannel.get_select_active_by_user_id_string(user_id)) db_results = self._context.select(UserJoinedVoiceChannel.get_select_active_by_user_id_string(user_id))

View File

@ -83,8 +83,7 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
self._users.update_user(user) self._users.update_user(user)
self._db.save_changes() self._db.save_changes()
self._logger.debug(__name__, self._logger.debug(__name__, f'User {user} leaved_on {join.leaved_on}. Ontime: {ontime}h | xp: from {old_xp} to {user.xp}')
f'User {user} leaved_on {join.leaved_on}. Ontime: {ontime}h | xp: from {old_xp} to {user.xp}')
except Exception as e: except Exception as e:
self._logger.error(__name__, f'Ontime validation failed', e) self._logger.error(__name__, f'Ontime validation failed', e)