chaosbot/ChaosBot/Services/RestrictedConfig.cs

28 lines
774 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ChaosBot.Models;
using ChaosBot.Repositories;
using Discord.Commands;
using Discord.WebSocket;
using NLog;
namespace ChaosBot.Services
{
public class RestrictedConfig
{
private static ILogger _logger = Program.Logger;
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"};
if (restrictedCfg.Contains(key))
return false;
return true;
}
}
}