fix: 小小 药材价格查询 秘境通知修复

This commit is contained in:
LyMysterious
2026-06-19 23:38:44 +08:00
parent b787478819
commit 34bf5c4d61
10 changed files with 62 additions and 22 deletions
@@ -1,5 +1,6 @@
using Furion.Logging;
using System.Globalization;
using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource;
namespace NapCatRobotClient.Service.Group.TextProcess
{
@@ -24,11 +25,11 @@ namespace NapCatRobotClient.Service.Group.TextProcess
List<string> keywords = new() { "进入秘境", "道友已踏入", "道友已破界", "道友已遁入", "道友已降临" };
string groupMsg = messageArray
.FirstOrDefault(o =>
o["type"]?.ToString() == "text"
&& !string.IsNullOrWhiteSpace(o["data"]?["text"]?.ToString())
&& keywords.Any(k => o["data"]["text"].ToString().Contains(k))
)?["data"]?["text"]?.ToString();
.FirstOrDefault(o =>
o["type"]?.ToString() == "text"
&& !string.IsNullOrWhiteSpace(o["data"]?["text"]?.ToString())
&& keywords.Any(k => o["data"]["text"].ToString().Contains(k))
)?["data"]?["text"]?.ToString();
if (string.IsNullOrWhiteSpace(groupMsg)) return false;
var minutes = ParseMinutes(groupMsg);