Properly Awaiting Async Tasks for Clean Compile
This commit is contained in:
parent
ee86714ca9
commit
49217b92b2
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@ -26,11 +24,11 @@ namespace ChaosBot.Discord.Modules.Admin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (cmd == "help")
|
if (cmd == "help")
|
||||||
ConfigHelp();
|
await ConfigHelp();
|
||||||
else if (cmd == "set")
|
else if (cmd == "set")
|
||||||
ConfigSet(key, value);
|
await ConfigSet(key, value);
|
||||||
else if (cmd == "get")
|
else if (cmd == "get")
|
||||||
ConfigGet(key);
|
await ConfigGet(key);
|
||||||
else
|
else
|
||||||
await ReplyAsync($"{Context.User.Mention}, The Sub-Command of Config {cmd} does not exist.");
|
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)
|
await dbContext.Configuration.Upsert(cnfSet)
|
||||||
.On(x => new {x.Key, x.DiscordGuildId}).RunAsync();
|
.On(x => new {x.Key, x.DiscordGuildId}).RunAsync();
|
||||||
|
|
||||||
ConfigGet(key, true);
|
await ConfigGet(key, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfigHelp();
|
await ConfigHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -139,7 +137,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfigHelp();
|
await ConfigHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user