Changed command dictionary to a command tree. Fixed various requests. OBS reconnection added if identified previously.
This commit is contained in:
19
Chat/Commands/Parameters/StaticParameter.cs
Normal file
19
Chat/Commands/Parameters/StaticParameter.cs
Normal file
@ -0,0 +1,19 @@
|
||||
namespace TwitchChatTTS.Chat.Commands.Parameters
|
||||
{
|
||||
public class StaticParameter : CommandParameter
|
||||
{
|
||||
private readonly string _value;
|
||||
|
||||
public string Value { get => _value; }
|
||||
|
||||
public StaticParameter(string name, string value, bool optional = false) : base(name, optional)
|
||||
{
|
||||
_value = value.ToLower();
|
||||
}
|
||||
|
||||
public override bool Validate(string value)
|
||||
{
|
||||
return _value == value.ToLower();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user