Properly Awaiting Async Tasks for Clean Compile

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-08-05 19:33:41 -04:00
parent ee86714ca9
commit 49217b92b2

View File

@ -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();
}
}