mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-08 14:58:21 +00:00
[feature] timer debugs.
This commit is contained in:
parent
2c0c887ba1
commit
f29370a31f
@ -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()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user