feat: 添加自动任务群监听触发验证码

This commit is contained in:
LyMysterious
2025-10-26 13:00:50 +08:00
parent 9a6efc579f
commit e8cd8a0023
10 changed files with 149 additions and 16 deletions
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.10",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}
@@ -1,3 +1,4 @@
using Furion.Logging;
using Microsoft.AspNetCore.Mvc;
using NapCatRobotClient.Service.Dispatcher.Service;
@@ -15,7 +16,7 @@ namespace NapCatRobotClient.API.Controllers
}
/// <summary>
/// ½ÓÊÕÏûÏ¢Èë¿Ú
/// 接收消息入口
/// </summary>
/// <returns></returns>
[HttpPost]
@@ -23,6 +24,7 @@ namespace NapCatRobotClient.API.Controllers
{
using StreamReader reader = new(Request.Body);
string body = await reader.ReadToEndAsync();
Log.Information($"接收到群消息:{body}");
bool result = await _dispatcherService.ReceiveMessageAndProcess(body);
return Ok(result);
}
@@ -13,11 +13,13 @@
"Redis": "127.0.0.1:6379,defaultDatabase=0,max pool size=50,tryit=0"
},
"QQConfig": {
"SendApiUrl": "http://192.168.142.133:3000",// NapCat HTTP服务端地址
"AccessToken": "123456",// NapCat HTTP服务端Token
"RobotQQ": "3902582794",// 当前登录机器人QQ号
"XiaoXiaoRobotQQ": "3889001741",// 小小机器人QQ号
"XiuXianGroupId": [ 705807264 ] // 要监听的群号
"SendApiUrl": "http://192.168.142.133:3000", // NapCat HTTP服务端地址
"AccessToken": "123456", // NapCat HTTP服务端Token
"RobotQQ": "3902582794", // 当前登录机器人QQ号
"XiaoXiaoRobotQQ": "3889001741", // 小小机器人QQ号
"XiuXianGroupId": [ 705807264 ], // 要监听的群号
"AutoTaskGroupId": [ 1035078191 ], // 自动做任务的群,主要检查是否触发了验证码 给指定QQ发消息
"SendMsgQQ": "123456789" // 发送私聊消息的QQ
},
"丹方": {
"灭神古丸": "配方主药三尾风叶1药引血菩提1辅药混元果1丹炉寒铁铸心炉\r\n配方主药冰灵焰草1药引诱妖草1辅药混元果1丹炉寒铁铸心炉",