fixed some bugs

This commit is contained in:
2022-08-17 20:23:06 +03:00
parent debdc58646
commit a8520c8c96
2 changed files with 6 additions and 2 deletions

Binary file not shown.

View File

@@ -298,19 +298,23 @@ public class ConsoleCommandsHandler
AddCommand("remplug", "Remove a plugin", "remplug [plugName]", async args =>
{
isDownloading = true;
if (args.Length <= 1) return;
isDownloading = true;
string plugName = Functions.MergeStrings(args, 1);
if (pluginsLoaded)
{
if (Functions.GetOperatingSystem() == Others.OperatingSystem.WINDOWS)
{
Process.Start("DiscordBot.exe ", $"/remplug {plugName}");
await Task.Delay(100);
Environment.Exit(0);
}
else
{
Process.Start("./DiscordBot", $"/remplug {plugName}");
await Task.Delay(100);
Environment.Exit(0);
}
isDownloading = false;
@@ -330,7 +334,7 @@ public class ConsoleCommandsHandler
if (!File.Exists(location))
{
Console.WriteLine("The plugig does not exist");
Console.WriteLine("The plugin does not exist");
return;
}