From 8110ed6cd481abdabb10077d0e9ae0849c4865a9 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 26 Sep 2024 18:13:09 +0800 Subject: [PATCH] chore: lowercase match --- src/main/kotlin/cn/rtast/fancybot/commands/HelpCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/HelpCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/HelpCommand.kt index 5a55fd2..e35dcd2 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/HelpCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/HelpCommand.kt @@ -39,7 +39,7 @@ class HelpCommand : BaseCommand() { } else { val commandName = args.first().replace("/", "") val matchedCommand = commands.find { - it.commandNames.map { map -> map.replace("/", "") }.contains(commandName) + it.commandNames.map { map -> map.replace("/", "").lowercase() }.contains(commandName) } if (matchedCommand == null) { message.reply("未查询到该命令")