fix: 秘境结算适配新旧两种提示

main
LyMysterious 6 months ago
parent b4f59b943c
commit 761b51cb54

@ -54,7 +54,7 @@ namespace RoBot.Start.Cmd
await Task.Delay(delay);
Dto.ConfigDto.ConfigSetting systemConfig = GlobalConfig.ConfigSetting;
Lagrange.Core.BotContext bot = GlobalConfig.BotContext;
await bot.SendMentionMsg((uint)systemConfig.GroupQQ, userId, $"秘境结算通知,该结算奖励了!({minutes} 分钟)");
await bot.SendMentionMsg((uint)systemConfig.GroupQQ, userId, $"【秘境结算通知】\r\n探索已完成该结算奖励了!({minutes} 分钟)");
});
}
@ -62,7 +62,7 @@ namespace RoBot.Start.Cmd
{
if (string.IsNullOrWhiteSpace(content)) return 0;
var match = Regex.Match(content, @"花费时间[:]\s*(\d+(?:\.\d+)?)", RegexOptions.Compiled);
var match = Regex.Match(content, @"(花费时间|探索耗时)[:]\s*(\d+(?:\.\d+)?)", RegexOptions.Compiled);
if (!match.Success)
{
match = Regex.Match(content, @"(\d+(?:\.\d+)?)", RegexOptions.Compiled);
@ -70,7 +70,7 @@ namespace RoBot.Start.Cmd
if (match.Success)
{
if (double.TryParse(match.Groups[1].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out double val))
if (double.TryParse(match.Groups[2].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out double val))
{
return (int)Math.Ceiling(val);
}

Loading…
Cancel
Save