From f84adbe857766c5027f41d0713c32f09a180f597 Mon Sep 17 00:00:00 2001 From: milimoe Date: Mon, 28 Oct 2024 01:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ListeningTask/GroupMessageTask.cs | 15 +++++++++++++++ src/Properties/launchSettings.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ListeningTask/GroupMessageTask.cs b/src/ListeningTask/GroupMessageTask.cs index 759f455..b457526 100644 --- a/src/ListeningTask/GroupMessageTask.cs +++ b/src/ListeningTask/GroupMessageTask.cs @@ -140,6 +140,21 @@ namespace Milimoe.RainBOT.ListeningTask } return quick_reply; } + + if (e.detail.Length >= 3 && e.detail[..3].Equals("查技能", StringComparison.CurrentCultureIgnoreCase)) + { + if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply; + string detail = e.detail.Replace("查技能", "").Trim(); + if (int.TryParse(detail, out int id)) + { + string msg = (await Bot.HttpGet("https://api.milimoe.com/fungame/cjs?id=" + id) ?? "").Trim(); + if (msg != "") + { + await Bot.SendGroupMessage(e.group_id, "查询FunGame角色技能", msg); + } + } + return quick_reply; + } // 发图API if (e.detail == "来图") diff --git a/src/Properties/launchSettings.json b/src/Properties/launchSettings.json index 5f55d09..d4eae39 100644 --- a/src/Properties/launchSettings.json +++ b/src/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "RainBOT": { "commandName": "Project", - "commandLineArgs": "--debug -g667678970" + "commandLineArgs": "--debug -g766616821" } } } \ No newline at end of file