mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-08 05:11:12 +00:00
[hotfix] role hotfix
This commit is contained in:
@@ -87,7 +87,7 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun manageAddCommand(msg: SessionChatMessage, user: User) {
|
private fun manageAddCommand(msg: SessionChatMessage, user: User) {
|
||||||
if (msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 명령어를 추가할 수 있습니다.")
|
handler.sendChat("매니저만 명령어를 추가할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun manageUpdateCommand(msg: SessionChatMessage, user: User) {
|
private fun manageUpdateCommand(msg: SessionChatMessage, user: User) {
|
||||||
if (msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 명령어를 추가할 수 있습니다.")
|
handler.sendChat("매니저만 명령어를 추가할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun manageRemoveCommand(msg: SessionChatMessage, user: User) {
|
private fun manageRemoveCommand(msg: SessionChatMessage, user: User) {
|
||||||
if (msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 명령어를 삭제할 수 있습니다.")
|
handler.sendChat("매니저만 명령어를 삭제할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -147,7 +147,7 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun timerCommand(msg: SessionChatMessage, user: User) {
|
private fun timerCommand(msg: SessionChatMessage, user: User) {
|
||||||
if (msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ class MessageHandler(
|
|||||||
|
|
||||||
val config = SongConfigService.getConfig(user)
|
val config = SongConfigService.getConfig(user)
|
||||||
|
|
||||||
if(config.streamerOnly && msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if(config.streamerOnly && msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun songStartCommand(msg: SessionChatMessage, user: User) {
|
private fun songStartCommand(msg: SessionChatMessage, user: User) {
|
||||||
if (msg.profile.badges.none { it.imageUrl.contains("manager") }) {
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -316,6 +316,11 @@ class MessageHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun categoryChangeCommand(msg: SessionChatMessage, user: User) {
|
private fun categoryChangeCommand(msg: SessionChatMessage, user: User) {
|
||||||
|
if (msg.profile.badges.none { it.imageUrl.contains("manager") || it.imageUrl.contains("streamer") }) {
|
||||||
|
handler.sendChat("매니저만 이 명령어를 사용할 수 있습니다.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val parts = msg.content.split(" ", limit = 2)
|
val parts = msg.content.split(" ", limit = 2)
|
||||||
if(parts.size <= 1) {
|
if(parts.size <= 1) {
|
||||||
handler.sendChat("카테고리가 없습니다.")
|
handler.sendChat("카테고리가 없습니다.")
|
||||||
|
Reference in New Issue
Block a user