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