Skip to content

Commit

Permalink
Removed some code unnessary for 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Voltstro committed Dec 24, 2019
1 parent 0714917 commit c9dad58
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/Pootis-Bot/Core/Managers/UserAccountsManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Discord.WebSocket;
using Pootis_Bot.Core.Logging;
using Pootis_Bot.Entities;
using Pootis_Bot.Helpers;

Expand All @@ -21,13 +19,6 @@ static UserAccountsManager()
}
else
{
if (CheckForOldFileName())
{
Logger.Log("Renamed accounts.json to UserAccounts.json", LogVerbosity.Warn);
Accounts = DataStorage.LoadUserAccounts(AccountsFile).ToList();
return;
}

Accounts = new List<UserAccount>();
SaveAccounts();
}
Expand Down Expand Up @@ -70,19 +61,6 @@ private static UserAccount GetOrCreateAccount(SocketGuildUser user)
return account;
}

//TODO: Remove this in the 1.0.0 release
/// <summary>
/// Checks for old file name (accounts.json)
/// </summary>
/// <returns>Returns true if upgraded</returns>
private static bool CheckForOldFileName()
{
if (!DataStorage.SaveExists("Resources/accounts.json")) return false;

File.Move("Resources/accounts.json", AccountsFile);
return true;
}

private static UserAccount CreateUserAccount(SocketGuildUser user)
{
UserAccount newAccount = new UserAccount
Expand Down

0 comments on commit c9dad58

Please sign in to comment.