Updated initial setup

This commit is contained in:
2023-04-01 16:14:04 +03:00
parent f2418d0395
commit d20cb62139
12 changed files with 338 additions and 135 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Numerics;
using PluginManager.Others;
using Discord;
@@ -118,6 +119,34 @@ namespace PluginManager
LogEvent?.Invoke(message);
Console.ForegroundColor = oldColor;
}
public static void SetConsoleColor(TextType type)
{
if(!isConsole) return;
switch (type)
{
case TextType.NORMAL:
Console.ForegroundColor = ConsoleColor.White;
break;
case TextType.ERROR:
Console.ForegroundColor = ConsoleColor.Red;
break;
case TextType.WARNING:
Console.ForegroundColor = ConsoleColor.Yellow;
break;
case TextType.SUCCESS:
Console.ForegroundColor = ConsoleColor.Green;
break;
default:
Console.ForegroundColor = ConsoleColor.White;
break;
}
}
public static void ResetConsoleColor()
{
if (!isConsole) return;
Console.ForegroundColor = ConsoleColor.White;
}
/// <summary>
/// Write logs to file