This commit is contained in:
@@ -11,7 +11,6 @@ namespace DiscordBot
|
||||
public class Entry
|
||||
{
|
||||
internal static StartupArguments startupArguments;
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
@@ -26,16 +25,7 @@ namespace DiscordBot
|
||||
return assembly;
|
||||
}
|
||||
|
||||
Task.Run(async () => {
|
||||
if (!File.Exists(Functions.dataFolder + "loader.json"))
|
||||
{
|
||||
startupArguments = new StartupArguments();
|
||||
await Functions.SaveToJsonFile(Functions.dataFolder + "loader.json", startupArguments);
|
||||
}
|
||||
else
|
||||
startupArguments = await Functions.ConvertFromJson<StartupArguments>(Functions.dataFolder + "loader.json");
|
||||
}).Wait();
|
||||
Program.Startup(args.Concat(startupArguments.runArgs.Split(' ')).ToArray());
|
||||
Program.Startup(args);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,6 +178,15 @@ public class Program
|
||||
Directory.CreateDirectory("./Data/Plugins");
|
||||
Directory.CreateDirectory("./Data/PAKS");
|
||||
|
||||
if (!File.Exists(Functions.dataFolder + "loader.json"))
|
||||
{
|
||||
Entry.startupArguments = new StartupArguments();
|
||||
await Functions.SaveToJsonFile(Functions.dataFolder + "loader.json", Entry.startupArguments);
|
||||
}
|
||||
else
|
||||
Entry.startupArguments = await Functions.ConvertFromJson<StartupArguments>(Functions.dataFolder + "loader.json");
|
||||
|
||||
|
||||
Settings.sqlDatabase = new SqlDatabase("SetDB.dat");
|
||||
|
||||
await Settings.sqlDatabase.Open();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using PluginManager.Online.Helpers;
|
||||
using PluginManager.Others;
|
||||
|
||||
@@ -17,8 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Roles", "..\DiscordBotItems
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DBEconomy", "..\DiscordBotItems\Plugins\DBEconomy\DBEconomy.csproj", "{0321365B-4ADC-4B1D-BD98-F573D36E83B2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "..\DiscordBotItems\Updater\Updater.csproj", "{1A411BE0-6AE4-4129-A0BD-0D1D5D4E2D1A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -53,10 +51,6 @@ Global
|
||||
{0321365B-4ADC-4B1D-BD98-F573D36E83B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0321365B-4ADC-4B1D-BD98-F573D36E83B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0321365B-4ADC-4B1D-BD98-F573D36E83B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1A411BE0-6AE4-4129-A0BD-0D1D5D4E2D1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A411BE0-6AE4-4129-A0BD-0D1D5D4E2D1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A411BE0-6AE4-4129-A0BD-0D1D5D4E2D1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A411BE0-6AE4-4129-A0BD-0D1D5D4E2D1A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user