Added several redemption actions. Added certain login features. Fixed OBS command. Added more logging.

This commit is contained in:
Tom
2024-07-07 03:42:33 +00:00
parent 706eecf2d2
commit af3763a837
20 changed files with 490 additions and 234 deletions

View File

@ -32,7 +32,7 @@ namespace TwitchChatTTS.Chat.Commands
public override async Task<bool> CheckPermissions(ChatMessage message, long broadcasterId)
{
return message.IsBroadcaster;
return message.IsModerator || message.IsBroadcaster;
}
public override async Task Execute(IList<string> args, ChatMessage message, long broadcasterId)
@ -52,6 +52,7 @@ namespace TwitchChatTTS.Chat.Commands
Type = "update_tts_voice_state",
Data = new Dictionary<string, object>() { { "voice", voiceId }, { "state", true } }
});
_logger.Information($"Enabled a TTS voice [voice: {voiceName}][invoker: {message.Username}][id: {message.UserId}]");
break;
case "disable":
await _hermesClient.Send(3, new RequestMessage()
@ -59,17 +60,9 @@ namespace TwitchChatTTS.Chat.Commands
Type = "update_tts_voice_state",
Data = new Dictionary<string, object>() { { "voice", voiceId }, { "state", false } }
});
break;
case "remove":
await _hermesClient.Send(3, new RequestMessage()
{
Type = "delete_tts_voice",
Data = new Dictionary<string, object>() { { "voice", voiceId } }
});
_logger.Information($"Disabled a TTS voice [voice: {voiceName}][invoker: {message.Username}][id: {message.UserId}]");
break;
}
_logger.Information($"Added a new TTS voice [voice: {voiceName}][invoker: {message.Username}][id: {message.UserId}]");
}
}
}