From 49217b92b23bc4c63b4f3752ed6fa77479044c3c Mon Sep 17 00:00:00 2001 From: Sean Stoves Date: Wed, 5 Aug 2020 19:33:41 -0400 Subject: [PATCH] Properly Awaiting Async Tasks for Clean Compile --- ChaosBot/Discord/Modules/Admin/Config.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ChaosBot/Discord/Modules/Admin/Config.cs b/ChaosBot/Discord/Modules/Admin/Config.cs index 300fda3..339ddc8 100644 --- a/ChaosBot/Discord/Modules/Admin/Config.cs +++ b/ChaosBot/Discord/Modules/Admin/Config.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using Discord.Commands; using System.Threading.Tasks; using System.Reflection; @@ -26,11 +24,11 @@ namespace ChaosBot.Discord.Modules.Admin try { if (cmd == "help") - ConfigHelp(); + await ConfigHelp(); else if (cmd == "set") - ConfigSet(key, value); + await ConfigSet(key, value); else if (cmd == "get") - ConfigGet(key); + await ConfigGet(key); else await ReplyAsync($"{Context.User.Mention}, The Sub-Command of Config {cmd} does not exist."); } @@ -93,12 +91,12 @@ namespace ChaosBot.Discord.Modules.Admin await dbContext.Configuration.Upsert(cnfSet) .On(x => new {x.Key, x.DiscordGuildId}).RunAsync(); - ConfigGet(key, true); + await ConfigGet(key, true); } } else { - ConfigHelp(); + await ConfigHelp(); } } @@ -139,7 +137,7 @@ namespace ChaosBot.Discord.Modules.Admin } else { - ConfigHelp(); + await ConfigHelp(); } }