mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-08 14:58:21 +00:00
Merge pull request #130 from dalbodeule/develop
[feature] timer debugs.
This commit is contained in:
commit
7257100adc
@ -237,6 +237,26 @@ class UserHandler(
|
|||||||
listener.on(SessionChatMessageEvent::class.java) {
|
listener.on(SessionChatMessageEvent::class.java) {
|
||||||
messageHandler.handle(it.message, user)
|
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) {
|
} catch(e: Exception) {
|
||||||
logger.error("Exception(${user.username}): ${e.stackTraceToString()}")
|
logger.error("Exception(${user.username}): ${e.stackTraceToString()}")
|
||||||
throw RuntimeException("Exception: ${e.stackTraceToString()}")
|
throw RuntimeException("Exception: ${e.stackTraceToString()}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user