[feature] timer debugs.

This commit is contained in:
dalbodeule 2025-05-18 09:24:11 +09:00
parent 2c0c887ba1
commit f29370a31f
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -237,6 +237,26 @@ class UserHandler(
listener.on(SessionChatMessageEvent::class.java) {
messageHandler.handle(it.message, user)
}
GlobalScope.launch {
val timer = TimerConfigService.getConfig(user)
if (timer?.option == TimerType.UPTIME.value)
dispatcher.post(
TimerEvent(
channel.channelId,
TimerType.UPTIME,
getUptime(streamStartTime!!)
)
)
else dispatcher.post(
TimerEvent(
channel.channelId,
TimerType.entries.firstOrNull { it.value == timer?.option } ?: TimerType.REMOVE,
null
)
)
}
} catch(e: Exception) {
logger.error("Exception(${user.username}): ${e.stackTraceToString()}")
throw RuntimeException("Exception: ${e.stackTraceToString()}")