mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix SubCommand name, use lowercase
This commit is contained in:
parent
0b72ee424c
commit
bd91d93fc9
@ -297,8 +297,8 @@ internal fun AbstractReflectionCommand.createSubCommand(
|
||||
subCommandAnnotationResolver.getSubCommandNames(this, function)
|
||||
.let { namesFromAnnotation ->
|
||||
if (namesFromAnnotation.isNotEmpty()) {
|
||||
namesFromAnnotation
|
||||
} else arrayOf(function.name)
|
||||
namesFromAnnotation.map(String::toLowerCase).toTypedArray()
|
||||
} else arrayOf(function.name.toLowerCase())
|
||||
}.also { names ->
|
||||
names.forEach {
|
||||
check(it.isValidSubName()) {
|
||||
|
Loading…
Reference in New Issue
Block a user