Merge pull request #10 from dalbodeule/develop

BUG FIX: fix #9
This commit is contained in:
JinU Choi 2024-07-29 16:01:30 +09:00 committed by GitHub
commit 1d23ac5121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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 ?: "")

View File

@ -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)

View File

@ -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 ?: "")