diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt index 743126efd..888bbc624 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CompositeCommandInternal.kt @@ -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()) {