Skip to content

Commit

Permalink
chore(core): /活动指令支持中文
Browse files Browse the repository at this point in the history
  • Loading branch information
diyigemt committed Aug 17, 2023
1 parent 0c71da1 commit fee8ae1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arona-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "net.diyigemt.arona"
version = "1.1.2-RC"
version = "1.1.2"
val miraiVersion = "2.11.1"
val exposedVersion = "0.38.2"
val sqliteVersion = "3.36.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ object ActivityCommand : SimpleCommand(
ServerLocale.CN -> sendCN(subject)
}
}
val preMatch = ServerLocale.values().firstOrNull { it.commandName == source || it.serverName == source }
when {
source.isNullOrBlank() -> sendByLocale(AronaNotifyConfig.defaultActivityCommandServer)
!ServerLocale.values().map { it.commandName }.contains(source) -> {
preMatch == null -> {
subject.sendMessage("参数不匹配, 是否想要执行:\n" +
"/活动 jp # 查询日服活动\n" +
"/活动 cn # 查询国服活动\n" +
"/活动 en # 查询国际服活动")
"/活动 日服 # 查询日服活动\n" +
"/活动 国服 # 查询国服活动\n" +
"/活动 国际服 # 查询国际服活动")
}
else -> {
sendByLocale(ServerLocale.values().first { it.commandName == source })
sendByLocale(preMatch)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arona-core/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: "net.diyigemt.arona"
version: "1.1.2-RC"
version: "1.1.2"
name: "blue-archive-arona"
author: "diyigemt"
main: "net.diyigemt.arona"
Expand Down

0 comments on commit fee8ae1

Please sign in to comment.