RegexBot/ConfigItem/Server.cs
Noikoio 376e44f941 Reorganized files to separate features
With the addition of moderation commands coming up, it will be good
having a clear separation of separate features both in code as well
as in the way the files themselves are organized.
This code change will be coming soon.
2017-07-21 20:51:00 -07:00

33 lines
1 KiB
C#

using Noikoio.RegexBot.Feature.RegexResponder;
using System.Collections.Generic;
using System.Diagnostics;
namespace Noikoio.RegexBot.ConfigItem
{
/// <summary>
/// Represents known information about a Discord guild (server) and other associated data
/// </summary>
class Server
{
private readonly string _name;
private ulong? _id;
private IEnumerable<RuleConfig> _rules;
private EntityList _moderators;
public string Name => _name;
public ulong? Id {
get => _id; set { if (!_id.HasValue) _id = value; }
}
public IEnumerable<RuleConfig> MatchResponseRules => _rules;
public EntityList Moderators => _moderators;
public Server(string name, ulong? id, IEnumerable<RuleConfig> rules, EntityList moderators)
{
_name = name;
_id = id;
_rules = rules;
_moderators = moderators;
Debug.Assert(_name != null && _rules != null && _moderators != null);
}
}
}