示例#1
0
        public ErrorStates CheckConfig()
        {
            ErrorStates state = ErrorStates.None;

            if (TraceMoeToken.Trim().Equals(String.Empty) && BotOwner.Trim().Equals(String.Empty))
            {
                state = ErrorStates.Warning;
            }
            if (DiscordToken.Trim().Equals(String.Empty))
            {
                state = ErrorStates.Error;
            }
            return(state);
        }
示例#2
0
        public string GetProblemsOfConfig()
        {
            StringBuilder sb = new StringBuilder();

            if (DiscordToken.Trim().Equals(String.Empty))
            {
                sb.AppendLine("Error: No DiscordToken defined!");
            }
            if (TraceMoeToken.Trim().Equals(String.Empty))
            {
                sb.AppendLine("Warning: No TraceMoeToken defined!");
            }
            if (BotOwner.Trim().Equals(String.Empty))
            {
                sb.AppendLine("Warning: No BotOwner defined!");
            }
            return(sb.ToString());
        }