using System; using System.Collections.Generic; using System.Linq; using BetterGenshinImpact.Core.Config; using BetterGenshinImpact.GameTask; using BetterGenshinImpact.Service.Notification; using BetterGenshinImpact.Service.Notification.Model.Enum; using Microsoft.Extensions.Logging; namespace BetterGenshinImpact.Core.Script.Dependence; public class Notification { private readonly AllConfig _config = TaskContext.Instance().Config; private readonly ILogger _logger = App.GetLogger(); private readonly TimeSpan _timeWindow = TimeSpan.FromMinutes(1); private readonly int _maxNotifications = 5; private readonly Queue _callRecords = new(); private static readonly string[] _forbiddenPatterns = [ "