mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
BUG FIX: fix #9
This commit is contained in:
parent
64880318e8
commit
8f8d2f895a
@ -1,6 +1,6 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
group = space.mori
|
group = space.mori
|
||||||
version = 1.0.2
|
version = 1.0.3
|
||||||
|
|
||||||
org.gradle.jvmargs=-Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Dfile.encoding=UTF-8
|
||||||
org.gradle.console=plain
|
org.gradle.console=plain
|
||||||
|
@ -38,12 +38,12 @@ object AddCommand : CommandInterface {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user == null) {
|
if (manager != null) {
|
||||||
user = manager!!.user
|
user = manager.user
|
||||||
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
||||||
}
|
}
|
||||||
|
|
||||||
val commands = CommandService.getCommands(user)
|
val commands = CommandService.getCommands(user!!)
|
||||||
if (commands.any { it.command == label }) {
|
if (commands.any { it.command == label }) {
|
||||||
event.hook.sendMessage("$label 명령어는 이미 있습니다! 업데이트 명령어를 써주세요.").queue()
|
event.hook.sendMessage("$label 명령어는 이미 있습니다! 업데이트 명령어를 써주세요.").queue()
|
||||||
return
|
return
|
||||||
|
@ -30,12 +30,12 @@ object AlertCommand : CommandInterface {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user == null) {
|
if (manager != null) {
|
||||||
user = manager!!.user
|
user = manager.user
|
||||||
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
||||||
}
|
}
|
||||||
|
|
||||||
val chzzkChannel = Connector.getChannel(user.token)
|
val chzzkChannel = Connector.getChannel(user!!.token)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val newUser = UserService.updateLiveAlert(user.id.value, channel?.guild?.idLong ?: 0L, channel?.idLong ?: 0L, content ?: "")
|
val newUser = UserService.updateLiveAlert(user.id.value, channel?.guild?.idLong ?: 0L, channel?.idLong ?: 0L, content ?: "")
|
||||||
|
@ -34,12 +34,12 @@ object RemoveCommand : CommandInterface {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user == null) {
|
if (manager != null) {
|
||||||
user = manager!!.user
|
user = manager.user
|
||||||
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
||||||
}
|
}
|
||||||
|
|
||||||
val chzzkChannel = Connector.getChannel(user.token)
|
val chzzkChannel = Connector.getChannel(user!!.token)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CommandService.removeCommand(user, label)
|
CommandService.removeCommand(user, label)
|
||||||
|
@ -38,12 +38,12 @@ object UpdateCommand : CommandInterface {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user == null) {
|
if (manager != null) {
|
||||||
user = manager!!.user
|
user = manager.user
|
||||||
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
ManagerService.updateManager(user, event.user.idLong, event.user.effectiveName)
|
||||||
}
|
}
|
||||||
|
|
||||||
val chzzkChannel = Connector.getChannel(user.token)
|
val chzzkChannel = Connector.getChannel(user!!.token)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CommandService.updateCommand(user, label, content, failContent ?: "")
|
CommandService.updateCommand(user, label, content, failContent ?: "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user