Bot automatically downloads requirements for plugins

This commit is contained in:
2022-04-20 21:59:49 +03:00
parent 1e7387cfa7
commit 29e4a3be04
5 changed files with 101 additions and 8 deletions

View File

@@ -22,8 +22,11 @@ namespace PluginManager.Online
}
public async Task DownloadFileAsync(string location = @"./Downloads/", string? pluginType = null)
public async Task DownloadFileAsync(string location = @"./Downloads/", string? pluginType = null, string customMessage = null)
{
if (customMessage != null)
Console.WriteLine(customMessage);
Directory.CreateDirectory(location);
if (isWorking) return;
isWorking = true;
@@ -73,9 +76,6 @@ namespace PluginManager.Online
Console.ForegroundColor = c;
Console.Write(" !\n");
}
}
}