Пример #1
0
 private void Disconnect()
 {
     try
     {
         client.Disconnect();
     }
     catch (Exception e)
     {
         logFile.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}: {e.Message}", true);
     }
 }
Пример #2
0
 internal void NewSession()
 {
     extraCoins = missedCoins = 0;
     bits       = subs = 0;
     extraCoinsText.WriteLine("0.00");
     if (DateTime.Now.DayOfWeek == DayOfWeek.Friday)
     {
         kraken = true;
         krakenText.WriteAllLines(new List <string>
         {
             "Next kraken: 0.00/11",
             "Krakens released: 0"
         });
         nextKraken   = 11;
         totalKrakens = 0;
     }
     else
     {
         kraken = false;
     }
     bot.Log("Automatically starting new session");
 }
Пример #3
0
 internal void LogError(string source, string message)
 {
     errorLogFile.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}: {source} -> {message}", true);
 }