Changed command dictionary to a command tree. Fixed various requests. OBS reconnection added if identified previously.
This commit is contained in:
16
Chat/Commands/Parameters/StateParameter.cs
Normal file
16
Chat/Commands/Parameters/StateParameter.cs
Normal file
@ -0,0 +1,16 @@
|
||||
namespace TwitchChatTTS.Chat.Commands.Parameters
|
||||
{
|
||||
public class StateParameter : CommandParameter
|
||||
{
|
||||
private string[] _values = ["on", "off", "true", "false", "enabled", "disabled", "enable", "disable", "yes", "no"];
|
||||
|
||||
public StateParameter(string name, bool optional = false) : base(name, optional)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Validate(string value)
|
||||
{
|
||||
return _values.Contains(value.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user