Updated Home page to restart the application in case of fail

This commit is contained in:
2024-10-23 21:58:40 +03:00
parent 5b1d511f77
commit f8df0f0254
3 changed files with 48 additions and 6 deletions

View File

@@ -28,7 +28,6 @@ namespace DiscordBotCore
/// <summary>
/// Defines the current application. This is a singleton class
/// </summary>
public static Application CurrentApplication { get; private set; } = null!;
public static bool IsRunning { get; private set; }
@@ -60,9 +59,10 @@ namespace DiscordBotCore
Console.WriteLine("No internet connection detected. Exiting ...");
Environment.Exit(0);
}
if (CurrentApplication is not null)
{
Logger.Log("Application is already initialized. Reinitialization is not allowed", LogType.Error);
return;
}