mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
chzzk livestream status handler fix
This commit is contained in:
parent
80d777dad5
commit
19d3f23cd7
@ -62,7 +62,7 @@ object ChzzkHandler {
|
|||||||
try {
|
try {
|
||||||
val streamInfo = getStreamInfo(it.channel.channelId)
|
val streamInfo = getStreamInfo(it.channel.channelId)
|
||||||
if (streamInfo.content.status == "OPEN" && !it.isActive) it.isActive(true, streamInfo)
|
if (streamInfo.content.status == "OPEN" && !it.isActive) it.isActive(true, streamInfo)
|
||||||
if (streamInfo.content.status == "CLOSED" && it.isActive) it.isActive(false, streamInfo)
|
if (streamInfo.content.status == "CLOSE" && it.isActive) it.isActive(false, streamInfo)
|
||||||
} catch(e: SocketTimeoutException) {
|
} catch(e: SocketTimeoutException) {
|
||||||
logger.info("Timeout: ${it.channel.channelName} / ${e.stackTraceToString()}")
|
logger.info("Timeout: ${it.channel.channelName} / ${e.stackTraceToString()}")
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@ -164,8 +164,6 @@ class UserHandler(
|
|||||||
} else {
|
} else {
|
||||||
logger.info("${user.username} is offline.")
|
logger.info("${user.username} is offline.")
|
||||||
listener.closeAsync()
|
listener.closeAsync()
|
||||||
|
|
||||||
listener.sendChat("${user.username} 님! 방송 수고하셨습니다.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user