public static void CheckTimer() { if (ModeratorEntries.Count > 0 || CityEntries.Count > 0 || GuildEntries.Count > 0 || GreetingsEntries.Any(e => e.Expires != DateTime.MinValue) || MysteriousPotionEffects != null) { if (Timer == null || !Timer.Running) { Timer = Timer.DelayCall(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5), CheckExpiredEntries); Timer.Priority = TimerPriority.OneMinute; } } else if (Timer != null) { Timer.Stop(); Timer = null; } }
public static bool HasCustomEntries() { return(GreetingsEntries.Any(x => x.Saves || x.Expires != DateTime.MinValue)); }