diff --git a/DiscordBot/Discord/Core/Boot.cs b/DiscordBot/Discord/Core/Boot.cs index af38879..ce2ad4c 100644 --- a/DiscordBot/Discord/Core/Boot.cs +++ b/DiscordBot/Discord/Core/Boot.cs @@ -96,7 +96,7 @@ internal class Boot Console.Title = "ONLINE"; isReady = true; - new Thread(async () => + new Thread(() => { while (true) { diff --git a/PluginManager/Config.cs b/PluginManager/Config.cs index e00cb5d..686fee4 100644 --- a/PluginManager/Config.cs +++ b/PluginManager/Config.cs @@ -78,9 +78,8 @@ namespace PluginManager appConfig = new() { ApplicationVariables = new Dictionary(), ProtectedKeyWords = new List() }; } - public static string? GetKey(string value) => appConfig.ApplicationVariables.Keys.FirstOrDefault(x => appConfig.ApplicationVariables[x] == value); - public static bool ContainsValue(string value) => appConfig.ApplicationVariables.ContainsValue(value); - public static bool ContainsKey(string key) => appConfig.ApplicationVariables.ContainsKey(key); + public static bool ContainsValue(T value) => appConfig.ApplicationVariables.ContainsValue(value!); + public static bool ContainsKey(string key) => appConfig.ApplicationVariables.ContainsKey(key); public static Dictionary GetAllVariables() => new(appConfig.ApplicationVariables); } diff --git a/PluginManager/Items/ConsoleCommandsHandler.cs b/PluginManager/Items/ConsoleCommandsHandler.cs index 3e18caf..5ac5947 100644 --- a/PluginManager/Items/ConsoleCommandsHandler.cs +++ b/PluginManager/Items/ConsoleCommandsHandler.cs @@ -188,7 +188,7 @@ public class ConsoleCommandsHandler } ); - AddCommand("add", "add variable to the system variables\nadd [key] [value] [isReadOnly=true/false]", async args => + AddCommand("add", "add variable to the system variables\nadd [key] [value] [isReadOnly=true/false]", args => { if (args.Length < 4) return; var key = args[1];