From a9aa5188f9563ce27a974278cf39ed52d1763fab Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:43:19 +0900 Subject: [PATCH] if stream end, send message and can't use commands.(live image url fix) --- src/main/kotlin/space/mori/chzzk_bot/chzzk/ChzzkHandler.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/kotlin/space/mori/chzzk_bot/chzzk/ChzzkHandler.kt b/src/main/kotlin/space/mori/chzzk_bot/chzzk/ChzzkHandler.kt index 1e17889..5e7b6e1 100644 --- a/src/main/kotlin/space/mori/chzzk_bot/chzzk/ChzzkHandler.kt +++ b/src/main/kotlin/space/mori/chzzk_bot/chzzk/ChzzkHandler.kt @@ -105,6 +105,7 @@ class UserHandler( } override fun onChat(msg: ChatMessage) { + if(!_isActive) return messageHandler.handle(msg, user) } @@ -158,9 +159,13 @@ class UserHandler( .setEmbeds(embed.build()) .build() ).queue() + + listener.sendChat("${user.username} 님의 방송이 감지되었습니다.") } } else { logger.info("${user.username} is offline.") + + listener.sendChat("${user.username} 님! 방송 수고하셨습니다.") } } } \ No newline at end of file