void BackupStats(List <string> write) { DateTime now = DateTime.Now; TxtFile backup = new TxtFile($@"{backupDirectoryPath}\{now.Year}-{now.Month}-{now.Day}-UserStats.ini"); backup.WriteAllLines(write); }
private void SaveCommands() { List <string> write = new List <string>(); foreach (var c in bot.personalizedCommands.customCommands) { write.Add($"{c.Key}={c.Value.info}"); } commandText.WriteAllLines(write); }
void SaveQuotes() { List <string> write = new List <string>(); foreach (var q in quotes) { write.Add($"{q.Key}&{q.Value}"); } quoteText.WriteAllLines(write); }
internal void SaveStats() { List <string> write = new List <string>(); foreach (var u in userStats) { write.Add($"{u.Key}={u.Value.coins}.{u.Value.time}.{u.Value.shards}"); } userStatsTxt.WriteAllLines(write); BackupStats(write); }
public static void SaveCredentials(string absolutePath) { TxtFile file = new TxtFile(absolutePath); List <string> write = new List <string> { $"Destination:{targetStream}", $"BotUsername:{botUsername}", $"BotToken:{botToken}", $"BotRefreshToken:{botRefreshToken}", $"AuthToken:{authToken}", $"AuthRefreshToken:{authRefreshToken}", $"ClientId:{clientId}", $"CurrencyName:{currencyName}" }; file.WriteAllLines(write); }
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"); }