mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
some fix
- "!노래추가" command append limits.
This commit is contained in:
parent
c5f8ce7528
commit
debbd61aa7
@ -211,9 +211,25 @@ class MessageHandler(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val config = SongConfigService.getConfig(user)
|
||||||
|
|
||||||
|
if(config.streamerOnly && msg.profile?.userRoleCode == "common_user") {
|
||||||
|
listener.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val url = parts[1]
|
val url = parts[1]
|
||||||
val songs = SongListService.getSong(user)
|
val songs = SongListService.getSong(user)
|
||||||
|
|
||||||
|
if(songs.size >= config.queueLimit) {
|
||||||
|
listener.sendChat("더이상 노래를 신청할 수 없습니다. 잠시 뒤 다시 시도해주세요!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(songs.filter { it.uid == msg.userId }.size >= config.personalLimit) {
|
||||||
|
listener.sendChat("더이상 노래를 신청할 수 없습니다. 잠시 뒤 다시 시도해주세요!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val video = getYoutubeVideo(url)
|
val video = getYoutubeVideo(url)
|
||||||
if (video == null) {
|
if (video == null) {
|
||||||
listener.sendChat("유튜브에서 찾을 수 없어요!")
|
listener.sendChat("유튜브에서 찾을 수 없어요!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user