Fixed UI crash when trying to open other pages then home while bot is offline

This commit is contained in:
2024-10-23 20:15:43 +03:00
parent cfcfecd4bc
commit 5b1d511f77
9 changed files with 65 additions and 93 deletions

View File

@@ -22,7 +22,7 @@ public class DiscordApplication
private async Task<bool> LoadComponents()
{
await Application.CreateApplication(RequirementsSolver); // This is a placeholder for the RequirementsSolver delegate
await Application.CreateApplication(RequirementsSolver);
Application.Logger.SetOutFunction(LogWriter);
return Application.CurrentApplication.ApplicationEnvironmentVariables.ContainsKey("ServerID") &&
@@ -33,9 +33,9 @@ public class DiscordApplication
public async Task Start()
{
if (!await LoadComponents())
{
Application.Logger.Log("Some required components are missing", LogType.Critical);
return;
}