Fixed on_voice_state

This commit is contained in:
Sven Heidemann 2022-07-19 11:17:18 +02:00
parent 453fef5e6b
commit b9697afd6d
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@
"Path": "logs/", "Path": "logs/",
"Filename": "log_$start_time.log", "Filename": "log_$start_time.log",
"ConsoleLogLevel": "ERROR", "ConsoleLogLevel": "ERROR",
"FileLogLevel": "WARN" "FileLogLevel": "INFO"
}, },
"Translation": { "Translation": {
"DefaultLanguage": "de", "DefaultLanguage": "de",

View File

@ -49,7 +49,7 @@ class StartupDiscordExtension(StartupExtensionABC):
# on_message # on_message
dc.add_event(DiscordEventTypesEnum.on_message.value, BaseOnMessageEvent) dc.add_event(DiscordEventTypesEnum.on_message.value, BaseOnMessageEvent)
# on_voice_state_update # on_voice_state_update
dc.add_event(DiscordEventTypesEnum.on_member_join.value, BaseOnVoiceStateUpdateEvent) dc.add_event(DiscordEventTypesEnum.on_voice_state_update.value, BaseOnVoiceStateUpdateEvent)
# on_ready # on_ready
dc.add_event(DiscordEventTypesEnum.on_ready.value, DatabaseOnReadyEvent) dc.add_event(DiscordEventTypesEnum.on_ready.value, DatabaseOnReadyEvent)
dc.add_event(DiscordEventTypesEnum.on_ready.value, PermissionOnReadyEvent) dc.add_event(DiscordEventTypesEnum.on_ready.value, PermissionOnReadyEvent)

View File

@ -65,7 +65,7 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
self._db.save_changes() self._db.save_changes()
return return
settings: BaseServerSettings = self._get_config(server.discord_server_id) settings: BaseServerSettings = self._base_helper.get_config(server.discord_server_id)
join = self._user_joins_vc.get_active_user_joined_voice_channel_by_user_id(user.user_id) join = self._user_joins_vc.get_active_user_joined_voice_channel_by_user_id(user.user_id)
join.leaved_on = datetime.now() join.leaved_on = datetime.now()