Tigran 3 years ago
parent
commit
d6e4500bf2
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CardCollector/Bot.cs
  2. 1 1
      CardCollector/TimerTasks/PiggyBankAlert.cs

+ 1 - 0
CardCollector/Bot.cs

@@ -36,6 +36,7 @@ namespace CardCollector
         public static void Main(string[] args)
         {
             Logs.LogOut("Bot started");
+            
             _timer.Elapsed += SavingChanges;
             _timer.Elapsed += UserDao.ClearMemory;
             TimerTask.SetupAll();

+ 1 - 1
CardCollector/TimerTasks/PiggyBankAlert.cs

@@ -11,7 +11,7 @@ namespace CardCollector.TimerTasks
     {
         protected override TimeSpan RunAt => Constants.DEBUG 
                 ? new TimeSpan(DateTime.Now.TimeOfDay.Hours, DateTime.Now.TimeOfDay.Minutes + 1, 0)
-                : new TimeSpan((DateTime.Now.TimeOfDay.Hours % 4 + 1) * 4, 0, 0);
+                : new TimeSpan((DateTime.Now.TimeOfDay.Hours / 4 + 1) * 4, 0, 0);
         
         protected override async void TimerCallback(object o, ElapsedEventArgs e)
         {