mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
Merge pull request #33 from dalbodeule/develop
Add command, update document.
This commit is contained in:
commit
59b90f2bcf
@ -32,6 +32,15 @@
|
||||
- [x] !명령어추가 \[명령어] \[내용]
|
||||
- [x] !명령어수정 \[명령어] \[내용]
|
||||
- [x] !명령어삭제 \[명령어]
|
||||
### 타이머 명령어 (on Chzzk chat, 매니저/스트리머 전용)
|
||||
- [x] !시간 \[숫자: 분]
|
||||
- [x] !시간 업타임
|
||||
- [x] !시간 삭제
|
||||
### 플레이리스트 명령어 (on Chzzk chat)
|
||||
- [x] !노래추가 \[유튜브 주소]
|
||||
- [x] !노래목록
|
||||
- [ ] !노래삭제 \[번호]
|
||||
- [ ] !노래설정 \[내용] \[켜기/끄기]
|
||||
|
||||
### Envs
|
||||
- DISCORD_TOKEN
|
||||
|
@ -56,7 +56,8 @@ class MessageHandler(
|
||||
"!명령어삭제" to this::manageRemoveCommand,
|
||||
"!명령어수정" to this::manageUpdateCommand,
|
||||
"!시간" to this::timerCommand,
|
||||
"!노래추가" to this::songAddCommand
|
||||
"!노래추가" to this::songAddCommand,
|
||||
"!노래목록" to this::songListCommand
|
||||
)
|
||||
|
||||
manageCommands.forEach { (commandName, command) ->
|
||||
@ -198,7 +199,7 @@ class MessageHandler(
|
||||
}
|
||||
|
||||
// songs
|
||||
fun songAddCommand(msg: ChatMessage, user: User) {
|
||||
private fun songAddCommand(msg: ChatMessage, user: User) {
|
||||
val parts = msg.content.split(" ", limit = 3)
|
||||
if (parts.size < 2) {
|
||||
listener.sendChat("유튜브 URL을 입력해주세요!")
|
||||
@ -243,6 +244,10 @@ class MessageHandler(
|
||||
listener.sendChat("노래가 추가되었습니다.")
|
||||
}
|
||||
|
||||
private fun songListCommand(msg: ChatMessage, user: User) {
|
||||
listener.sendChat("리스트는 여기입니다. https://nabot.mori.space/songs/${user.token}")
|
||||
}
|
||||
|
||||
internal fun handle(msg: ChatMessage, user: User) {
|
||||
if(msg.userId == ChzzkHandler.botUid) return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user