Updated Logger and Plugin Loading

This commit is contained in:
2024-06-20 18:23:48 +03:00
parent 86b951f50f
commit 68886fa5f0
11 changed files with 37 additions and 25 deletions

View File

@@ -85,7 +85,7 @@ namespace DiscordBotUI_Windows
if (theme == null)
throw new Exception("Theme not found");
string basefolderPath = Path.Combine(DiscordBotCore.Application.CurrentApplication.DataFolder, _ThemesFolder);
string basefolderPath = DiscordBotCore.Application.GetResourceFullPath(_ThemesFolder);
Directory.CreateDirectory(basefolderPath);
string filePath = Path.Combine(basefolderPath, $"{themeName}.json");
await DiscordBotCore.Others.JsonManager.SaveToJsonFile(filePath, theme);
@@ -93,7 +93,7 @@ namespace DiscordBotUI_Windows
internal async Task<int> LoadThemesFromThemesFolder()
{
string basefolderPath = Path.Combine(DiscordBotCore.Application.CurrentApplication.DataFolder, _ThemesFolder);
string basefolderPath = DiscordBotCore.Application.GetResourceFullPath(_ThemesFolder);
Directory.CreateDirectory(basefolderPath);
var files = Directory.GetFiles(basefolderPath, "*.json");
_InstalledThemes.Clear();