feat: 修改验证码触发消息 添加触发的QQ
This commit is contained in:
@@ -28,6 +28,15 @@ namespace NapCatRobotClient.Service.Group.TextProcess
|
|||||||
List<string> text = ["请先验证", "请验证", "深色文字"];
|
List<string> text = ["请先验证", "请验证", "深色文字"];
|
||||||
if (text.Any(message.Contains))
|
if (text.Any(message.Contains))
|
||||||
{
|
{
|
||||||
|
var atData = JArray.Parse(json["message"].ToString()).FirstOrDefault(o => o["type"].ToString() == "at");
|
||||||
|
List<string> sendMsg =
|
||||||
|
[
|
||||||
|
DateTime.Now.ToString(),
|
||||||
|
"【触发小小验证码消息】",
|
||||||
|
$"群昵称:{groupName}",
|
||||||
|
$"群号:{groupId}",
|
||||||
|
$"QQ号:{atData?["data"]?["qq"]}"
|
||||||
|
];
|
||||||
PrivateSendMessageRequest request = new()
|
PrivateSendMessageRequest request = new()
|
||||||
{
|
{
|
||||||
UserId = App.Configuration["QQConfig:SendMsgQQ"],
|
UserId = App.Configuration["QQConfig:SendMsgQQ"],
|
||||||
@@ -38,7 +47,7 @@ namespace NapCatRobotClient.Service.Group.TextProcess
|
|||||||
Type = "text",
|
Type = "text",
|
||||||
Data = new()
|
Data = new()
|
||||||
{
|
{
|
||||||
Text = $"{DateTime.Now}\r\n触发小小验证消息\r\n群昵称:{groupName}\r\n群号:{groupId}"
|
Text = string.Join("\r\n",sendMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user