From 767bd7c0f3c635af1781f2088b3bc51e230dbc91 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Wed, 2 Oct 2024 20:05:52 +0800 Subject: [PATCH] docs: update docs --- README.md | 2 +- .../kotlin/cn/rtast/fancybot/commands/misc/CompilerCommand.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd1f1e4..8b31a3d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ # 概述 -> 这是一个使用了 `ROneBot` 框架的QQ机器人, 包含了20多种命令, 例如: 点歌, 今日人品, 签到... +> 这是一个使用了 `ROneBot` 框架的QQ机器人, 包含了超多命令, 例如: 点歌, 今日人品, 签到... > 你可以在[这里](src/main/kotlin/cn/rtast/fancybot/commands/)来查看所有的命令 > ROneBot项目地址: [Gitlab](https://repo.rtast.cn/RTAkland/ronebot) [Github](https://github.com/RTAkland/ROneBot) diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/misc/CompilerCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/misc/CompilerCommand.kt index c759b6b..5050eb6 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/misc/CompilerCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/misc/CompilerCommand.kt @@ -31,10 +31,10 @@ class CompilerCommand : BaseCommand() { message.reply("使用`/exec` <语言> <代码> 即可执行~") return } - var language = args.first() + var language = args.first().lowercase() val code = args.drop(1).joinToString(" ") val response = when (language) { - "kotlin", "Kotlin", "kt", "Kt", "KT" -> { + "kotlin", "kt" -> { Http.post( kotlinCompilerServer, jsonBody = KCSPayload(listOf(KCSPayload.File(code))).toJson()