Added groups & permissions. Fixed TTS user creation. Better connection handling. Fixed 7tv reconnection.
This commit is contained in:
17
Chat/Commands/Parameters/SimpleListedParameter.cs
Normal file
17
Chat/Commands/Parameters/SimpleListedParameter.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace TwitchChatTTS.Chat.Commands.Parameters
|
||||
{
|
||||
public class SimpleListedParameter : ChatCommandParameter
|
||||
{
|
||||
private readonly string[] _values;
|
||||
|
||||
public SimpleListedParameter(string[] possibleValues, bool optional = false) : base("TTS Voice Name", "Name of a TTS voice", optional)
|
||||
{
|
||||
_values = possibleValues;
|
||||
}
|
||||
|
||||
public override bool Validate(string value)
|
||||
{
|
||||
return _values.Contains(value.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user