From 764714c33a88ee08635037e29d61e654fe42a7e8 Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:34:49 +0900 Subject: [PATCH] =?UTF-8?q?add=20"!=EB=AA=85=EB=A0=B9=EC=96=B4"=20commandL?= =?UTF-8?q?istCommand.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../space/mori/chzzk_bot/chatbot/chzzk/MessageHandler.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/MessageHandler.kt b/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/MessageHandler.kt index 28fc278..a11561c 100644 --- a/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/MessageHandler.kt +++ b/chatbot/src/main/kotlin/space/mori/chzzk_bot/chatbot/chzzk/MessageHandler.kt @@ -53,13 +53,14 @@ class MessageHandler( ?: throw RuntimeException("User not found. it's bug? ${channel.channelName} - ${channel.channelId}") val commands = CommandService.getCommands(user) val manageCommands = mapOf( + "!명령어" to this::commandListCommand, "!명령어추가" to this::manageAddCommand, "!명령어삭제" to this::manageRemoveCommand, "!명령어수정" to this::manageUpdateCommand, "!시간" to this::timerCommand, "!신청곡" to this::songAddCommand, "!노래목록" to this::songListCommand, - "!노래시작" to this::songStartCommand + "!노래시작" to this::songStartCommand, ) manageCommands.forEach { (commandName, command) -> @@ -76,6 +77,10 @@ class MessageHandler( } } + private fun commandListCommand(msg: ChatMessage, user: User) { + listener.sendChat("리스트는 여기입니다. https://nabot.mori.space/commands/${user.token}") + } + private fun manageAddCommand(msg: ChatMessage, user: User) { if (msg.profile?.userRoleCode == "common_user") { listener.sendChat("매니저만 명령어를 추가할 수 있습니다.")