Fix synchronous async warning RestrictedConfig
This commit is contained in:
parent
95388d65e5
commit
18c7b2c961
@ -86,7 +86,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
||||
{
|
||||
if ((key != null) && (value != null) )
|
||||
{
|
||||
if(await RestrictedConfig.IsAllowed(key))
|
||||
if(RestrictedConfig.IsAllowed(key))
|
||||
{
|
||||
using (ChaosbotContext dbContext = new ChaosbotContext())
|
||||
{
|
||||
@ -120,7 +120,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
||||
{
|
||||
try
|
||||
{
|
||||
if ((key != null) && (await RestrictedConfig.IsAllowed(key)))
|
||||
if ((key != null) && (RestrictedConfig.IsAllowed(key)))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
EmbedBuilder embed = new EmbedBuilder();
|
||||
@ -161,7 +161,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
||||
{
|
||||
try
|
||||
{
|
||||
if ((key != null) && (await RestrictedConfig.IsAllowed(key)))
|
||||
if ((key != null) && (RestrictedConfig.IsAllowed(key)))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
EmbedBuilder embed = new EmbedBuilder();
|
||||
|
||||
@ -14,7 +14,7 @@ namespace ChaosBot.Services
|
||||
{
|
||||
private static ILogger _logger = Program.Logger;
|
||||
|
||||
public static async Task<Boolean> IsAllowed(string key)
|
||||
public static Boolean IsAllowed(string key)
|
||||
{
|
||||
// TODO: List populated from DB
|
||||
List<string> restrictedCfg = new List<string> {"Database:Host", "Database:Port", "Database:Name", "Database:User", "Database:Pass", "Bot:Version", "NLog", "WebServer", "Discord:Token"};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user