feat: 添加自动任务群监听触发验证码
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user