Patching system build 2

This commit is contained in:
2022-08-17 09:58:54 +03:00
parent 5ab3195956
commit bbc1c601c9
4 changed files with 12 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Online.Helpers;
using PluginManager.Online.Updates;
using PluginManager.Others;
@@ -68,7 +69,7 @@ public class PluginLoader
{
string name = new FileInfo(file).Name.Split('.')[0];
if (!Config.PluginVersionsContainsKey(name))
Config.SetPluginVersion(name, "0.0.0");
Config.SetPluginVersion(name, (await VersionString.GetVersionOfPackageFromWeb(name))?.PackageID + ".0.0");
if (await PluginUpdater.CheckForUpdates(name))
await PluginUpdater.Download(name);
@@ -76,6 +77,8 @@ public class PluginLoader
}
Config.SaveConfig();
Commands = new List<DBCommand>();
Events = new List<DBEvent>();