mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +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)
|
subCommandAnnotationResolver.getSubCommandNames(this, function)
|
||||||
.let { namesFromAnnotation ->
|
.let { namesFromAnnotation ->
|
||||||
if (namesFromAnnotation.isNotEmpty()) {
|
if (namesFromAnnotation.isNotEmpty()) {
|
||||||
namesFromAnnotation
|
namesFromAnnotation.map(String::toLowerCase).toTypedArray()
|
||||||
} else arrayOf(function.name)
|
} else arrayOf(function.name.toLowerCase())
|
||||||
}.also { names ->
|
}.also { names ->
|
||||||
names.forEach {
|
names.forEach {
|
||||||
check(it.isValidSubName()) {
|
check(it.isValidSubName()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user