mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 21:01:14 +00:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
80d777dad5 |
@@ -116,11 +116,6 @@ class UserHandler(
|
|||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
init {
|
|
||||||
logger.info("ChzzkChat connecting... ${channel.channelName} - ${channel.channelId}")
|
|
||||||
listener.connectAsync()
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun disable() {
|
internal fun disable() {
|
||||||
listener.closeAsync()
|
listener.closeAsync()
|
||||||
}
|
}
|
||||||
@@ -140,6 +135,10 @@ class UserHandler(
|
|||||||
_isActive = value
|
_isActive = value
|
||||||
if(value) {
|
if(value) {
|
||||||
logger.info("${user.username} is live.")
|
logger.info("${user.username} is live.")
|
||||||
|
|
||||||
|
logger.info("ChzzkChat connecting... ${channel.channelName} - ${channel.channelId}")
|
||||||
|
listener.connectAsync()
|
||||||
|
|
||||||
if(user.liveAlertMessage != "" && user.liveAlertGuild != null && user.liveAlertChannel != null) {
|
if(user.liveAlertMessage != "" && user.liveAlertGuild != null && user.liveAlertChannel != null) {
|
||||||
val channel = discord.getChannel(user.liveAlertGuild!!, user.liveAlertChannel!!) ?: throw RuntimeException("${user.liveAlertChannel} is not valid.")
|
val channel = discord.getChannel(user.liveAlertGuild!!, user.liveAlertChannel!!) ?: throw RuntimeException("${user.liveAlertChannel} is not valid.")
|
||||||
|
|
||||||
@@ -164,6 +163,7 @@ class UserHandler(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.info("${user.username} is offline.")
|
logger.info("${user.username} is offline.")
|
||||||
|
listener.closeAsync()
|
||||||
|
|
||||||
listener.sendChat("${user.username} 님! 방송 수고하셨습니다.")
|
listener.sendChat("${user.username} 님! 방송 수고하셨습니다.")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user