feat:调整灵田回复 悬赏令回复

main
LyMysterious 6 months ago
parent deac74e521
commit 9a6efc579f

@ -13,11 +13,11 @@
"Redis": "127.0.0.1:6379,defaultDatabase=0,max pool size=50,tryit=0" "Redis": "127.0.0.1:6379,defaultDatabase=0,max pool size=50,tryit=0"
}, },
"QQConfig": { "QQConfig": {
"SendApiUrl": "http://192.168.142.133:3000", "SendApiUrl": "http://192.168.142.133:3000",// NapCat HTTP
"AccessToken": "123456", "AccessToken": "123456",// NapCat HTTPToken
"RobotQQ": "3902582794", "RobotQQ": "3902582794",// QQ
"XiaoXiaoRobotQQ": "3889001741", "XiaoXiaoRobotQQ": "3889001741",// QQ
"XiuXianGroupId": "705807264" "XiuXianGroupId": [ 705807264 ] //
}, },
"丹方": { "丹方": {
"灭神古丸": "配方主药三尾风叶1药引血菩提1辅药混元果1丹炉寒铁铸心炉\r\n配方主药冰灵焰草1药引诱妖草1辅药混元果1丹炉寒铁铸心炉", "灭神古丸": "配方主药三尾风叶1药引血菩提1辅药混元果1丹炉寒铁铸心炉\r\n配方主药冰灵焰草1药引诱妖草1辅药混元果1丹炉寒铁铸心炉",
@ -145,6 +145,8 @@
"❌👀😍🤔": "不堪设想", "❌👀😍🤔": "不堪设想",
"🍺🍀": "九死一生", "🍺🍀": "九死一生",
"😲🏹🇿🐦": "惊弓之鸟", "😲🏹🇿🐦": "惊弓之鸟",
"🐓✈️🥚🤛": "鸡飞蛋打" "🐓✈️🥚🤛": "鸡飞蛋打",
"🐴🌾🍊🏹": "马到成功",
"😋🥂🤹‍♂️😀": "吃喝玩乐"
} }
} }

@ -4,7 +4,7 @@ namespace NapCatRobotClient.Service.Group.Service
{ {
public class GroupService : IGroupService, IScoped public class GroupService : IGroupService, IScoped
{ {
private static string GroupQQ = App.Configuration["QQConfig:XiuXianGroupId"]; private static List<string> GroupQQ = App.GetConfig<List<string>>("QQConfig:XiuXianGroupId");
/// <summary> /// <summary>
/// 处理群消息 /// 处理群消息
@ -16,7 +16,7 @@ namespace NapCatRobotClient.Service.Group.Service
JObject json = JObject.Parse(message); JObject json = JObject.Parse(message);
string groupId = json["group_id"]?.ToString() ?? string.Empty; string groupId = json["group_id"]?.ToString() ?? string.Empty;
string groupMsg = json["message"]?.ToString() ?? string.Empty; string groupMsg = json["message"]?.ToString() ?? string.Empty;
if (GroupQQ == groupId && string.IsNullOrWhiteSpace(groupMsg) is false) if (GroupQQ.Contains(groupId) && string.IsNullOrWhiteSpace(groupMsg) is false)
{ {
_ = WantedPriceProcess.ProcessGroupRequest(groupId, message); _ = WantedPriceProcess.ProcessGroupRequest(groupId, message);

@ -148,7 +148,7 @@ namespace NapCatRobotClient.Service.Group.TextProcess
Type = "text", Type = "text",
Data = new() Data = new()
{ {
Text = $"\r\n【灵田结算通知】\r\n该结算奖励了" Text = $"【灵田结算通知】\r\n该结算奖励了"
} }
}, },
new MessageItem() new MessageItem()

@ -62,6 +62,14 @@ namespace NapCatRobotClient.Service.Group.TextProcess
GroupId = groupId, GroupId = groupId,
Message = new() Message = new()
{ {
new MessageItem()
{
Type = "reply",
Data = new()
{
Id = json["message_id"].ToString()
}
},
new MessageItem() new MessageItem()
{ {
Type = "text", Type = "text",

Loading…
Cancel
Save