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
@@ -4,7 +4,15 @@ namespace NapCatRobotClient.Service.Group.Service
{
public class GroupService : IGroupService, IScoped
{
private static List<string> GroupQQ = App.GetConfig<List<string>>("QQConfig:XiuXianGroupId");
/// <summary>
/// 修仙大群
/// </summary>
private static List<string> XiuXianGroup = App.GetConfig<List<string>>("QQConfig:XiuXianGroupId");
/// <summary>
/// 自动做任务群
/// </summary>
private static List<string> AutoTaskGroup = App.GetConfig<List<string>>("QQConfig:AutoTaskGroupId");
/// <summary>
/// 处理群消息
@@ -16,7 +24,7 @@ namespace NapCatRobotClient.Service.Group.Service
JObject json = JObject.Parse(message);
string groupId = json["group_id"]?.ToString() ?? string.Empty;
string groupMsg = json["message"]?.ToString() ?? string.Empty;
if (GroupQQ.Contains(groupId) && string.IsNullOrWhiteSpace(groupMsg) is false)
if (XiuXianGroup.Contains(groupId) && string.IsNullOrWhiteSpace(groupMsg) is false)
{
_ = WantedPriceProcess.ProcessGroupRequest(groupId, message);
@@ -32,6 +40,10 @@ namespace NapCatRobotClient.Service.Group.Service
_ = ImmortalElixirProcess.ProcessGroupRequest(groupId, message);
}
if (AutoTaskGroup.Contains(groupId) && string.IsNullOrWhiteSpace(groupMsg) is false)
{
_= VerifyMsgProcess.ProcessGroupRequest(groupId, message);
}
return await Task.FromResult(true);
}