Fixed command permissions. Moved to using Twitch's EventSub via websockets. Cleaned some code up. Added detection for subscription messages (no TTS), message deletion, full or partial chat clear. Removes messages from TTS queue if applicable. Added command aliases for static parameters. Word filters use compiled regex if possible. Fixed TTS voice deletion.
This commit is contained in:
16
Chat/Commands/Parameters/MentionParameter.cs
Normal file
16
Chat/Commands/Parameters/MentionParameter.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using TwitchChatTTS.Twitch.Socket.Messages;
|
||||
|
||||
namespace TwitchChatTTS.Chat.Commands.Parameters
|
||||
{
|
||||
public class MentionParameter : CommandParameter
|
||||
{
|
||||
public MentionParameter(string name, bool optional = false) : base(name, optional)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Validate(string value, ChannelChatMessage message)
|
||||
{
|
||||
return value.StartsWith('@') && message.Message.Fragments.Any(f => f.Text == value && f.Mention != null);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user