添加查技能接口

This commit is contained in:
milimoe 2024-10-28 01:36:40 +08:00
parent a960d3cf08
commit f84adbe857
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
2 changed files with 16 additions and 1 deletions

View File

@ -140,6 +140,21 @@ namespace Milimoe.RainBOT.ListeningTask
} }
return quick_reply; 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<string>("https://api.milimoe.com/fungame/cjs?id=" + id) ?? "").Trim();
if (msg != "")
{
await Bot.SendGroupMessage(e.group_id, "查询FunGame角色技能", msg);
}
}
return quick_reply;
}
// 发图API // 发图API
if (e.detail == "来图") if (e.detail == "来图")

View File

@ -2,7 +2,7 @@
"profiles": { "profiles": {
"RainBOT": { "RainBOT": {
"commandName": "Project", "commandName": "Project",
"commandLineArgs": "--debug -g667678970" "commandLineArgs": "--debug -g766616821"
} }
} }
} }