mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 15:28:21 +00:00
some logic changed.
This commit is contained in:
parent
608ba49a71
commit
de30e632e5
@ -161,19 +161,24 @@ class UserHandler(
|
|||||||
streamStartTime = status.content?.openDate?.let { convertChzzkDateToLocalDateTime(it) }
|
streamStartTime = status.content?.openDate?.let { convertChzzkDateToLocalDateTime(it) }
|
||||||
|
|
||||||
CoroutineScope(Dispatchers.Default).launch {
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
when(TimerConfigService.getConfig(UserService.getUser(channel.channelId)!!)?.option) {
|
|
||||||
TimerType.UPTIME.value -> dispatcher.post(TimerEvent(
|
|
||||||
channel.channelId,
|
|
||||||
TimerType.UPTIME,
|
|
||||||
getUptime(streamStartTime!!)
|
|
||||||
))
|
|
||||||
else -> dispatcher.post(TimerEvent(
|
|
||||||
channel.channelId,
|
|
||||||
TimerType.REMOVE,
|
|
||||||
""
|
|
||||||
))
|
|
||||||
}
|
|
||||||
if(!_isActive) {
|
if(!_isActive) {
|
||||||
|
when(TimerConfigService.getConfig(UserService.getUser(channel.channelId)!!)?.option) {
|
||||||
|
TimerType.UPTIME.value -> dispatcher.post(
|
||||||
|
TimerEvent(
|
||||||
|
channel.channelId,
|
||||||
|
TimerType.UPTIME,
|
||||||
|
getUptime(streamStartTime!!)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
else -> dispatcher.post(
|
||||||
|
TimerEvent(
|
||||||
|
channel.channelId,
|
||||||
|
TimerType.REMOVE,
|
||||||
|
""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
delay(5000L)
|
delay(5000L)
|
||||||
try {
|
try {
|
||||||
listener.sendChat("${user.username} 님! 오늘도 열심히 방송하세요!")
|
listener.sendChat("${user.username} 님! 오늘도 열심히 방송하세요!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user