Changed from TextType to LogLevel
This commit is contained in:
@@ -32,7 +32,7 @@ namespace DiscordBot
|
||||
Config.Data.Add("prefix", prefix);
|
||||
Config.Data.Add("ServerID", serverId);
|
||||
|
||||
Config.Logger.Log("Config Saved", "Installer", TextType.NORMAL);
|
||||
Config.Logger.Log("Config Saved", "Installer", LogLevel.INFO);
|
||||
|
||||
Config.Data.Save();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using PluginManager.Online.Helpers;
|
||||
using PluginManager.Others;
|
||||
|
||||
using DiscordBot.Utilities;
|
||||
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
using OperatingSystem = PluginManager.Others.OperatingSystem;
|
||||
using static PluginManager.Config;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Config.Logger.Log(ex.ToString(), "Bot", TextType.ERROR);
|
||||
Config.Logger.Log(ex.ToString(), "Bot", LogLevel.ERROR);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public class Program
|
||||
if (Config.Data.ContainsKey("LaunchMessage"))
|
||||
Config.Data.Add("LaunchMessage",
|
||||
"An error occured while closing the bot last time. Please consider closing the bot using the &rsd&c method !\nThere is a risk of losing all data or corruption of the save file, which in some cases requires to reinstall the bot !");
|
||||
Config.Logger.Log("An error occured while closing the bot last time. Please consider closing the bot using the &rsd&c method !\nThere is a risk of losing all data or corruption of the save file, which in some cases requires to reinstall the bot !", "Bot", TextType.ERROR);
|
||||
Config.Logger.Log("An error occured while closing the bot last time. Please consider closing the bot using the &rsd&c method !\nThere is a risk of losing all data or corruption of the save file, which in some cases requires to reinstall the bot !", "Bot", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -200,7 +200,7 @@ public class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Config.Logger.Log(ex.ToString(), "Bot", TextType.ERROR);
|
||||
Config.Logger.Log(ex.ToString(), "Bot", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ public class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Config.Logger.Log(ex.Message, "Updater", TextType.ERROR);
|
||||
Config.Logger.Log(ex.Message, "Updater", LogLevel.ERROR);
|
||||
if (ex.Message.Contains("Access de"))
|
||||
Config.Logger.Log("Please run the bot as root.");
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public class ConsoleCommandsHandler
|
||||
if (File.Exists("./" + split[1])) File.Delete("./" + split[1]);
|
||||
await ServerCom.DownloadFileAsync(split[0], "./" + split[1], null);
|
||||
|
||||
Console.WriteLine("Item " + split[1] + " downloaded !", this, TextType.SUCCESS);
|
||||
Console.WriteLine("Item " + split[1] + " downloaded !");
|
||||
|
||||
Console.WriteLine();
|
||||
if (split[0].EndsWith(".pak"))
|
||||
@@ -254,7 +254,7 @@ public class ConsoleCommandsHandler
|
||||
{
|
||||
Console.WriteLine($"Extracting {split[1]} ...");
|
||||
await ArchiveManager.ExtractArchive("./" + split[1], "./", null,
|
||||
UnzipProgressType.PercentageFromTotalSize);
|
||||
UnzipProgressType.PERCENTAGE_FROM_TOTAL_SIZE);
|
||||
Console.WriteLine("\n");
|
||||
File.Delete("./" + split[1]);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class ConsoleCommandsHandler
|
||||
isDownloading = false;
|
||||
|
||||
|
||||
Config.Logger.Log("Plugin installed !", this, TextType.SUCCESS);
|
||||
Config.Logger.Log("Plugin installed !", this, LogLevel.INFO);
|
||||
|
||||
//await ExecuteCommad("localload " + name);
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public class ConsoleCommandsHandler
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Config.Logger.Log(ex.Message, this, TextType.ERROR);
|
||||
Config.Logger.Log(ex.Message, this, LogLevel.ERROR);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user