From 97888626b6a5c77aa70ada839fbceb0c9a334801 Mon Sep 17 00:00:00 2001 From: Wizzy69 Date: Thu, 9 Jun 2022 17:19:51 +0300 Subject: [PATCH] --- DiscordBot/Discord/Core/Boot.cs | 2 +- PluginManager/Config.cs | 5 ++--- PluginManager/Items/ConsoleCommandsHandler.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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];