Added Veadotube integration

This commit is contained in:
Tom
2024-12-02 20:51:04 +00:00
parent 48dd6858a1
commit b35183249b
8 changed files with 323 additions and 0 deletions

13
TTS.cs
View File

@@ -14,6 +14,7 @@ using TwitchChatTTS.Twitch.Socket;
using TwitchChatTTS.Chat.Commands;
using System.Text;
using TwitchChatTTS.Chat.Speech;
using TwitchChatTTS.Veadotube;
namespace TwitchChatTTS
{
@@ -29,6 +30,7 @@ namespace TwitchChatTTS
private readonly OBSSocketClient _obs;
private readonly SevenSocketClient _seven;
private readonly TwitchWebsocketClient _twitch;
private readonly VeadoSocketClient _veado;
private readonly ICommandFactory _commandFactory;
private readonly ICommandManager _commandManager;
private readonly IEmoteDatabase _emotes;
@@ -45,6 +47,7 @@ namespace TwitchChatTTS
[FromKeyedServices("obs")] SocketClient<WebSocketMessage> obs,
[FromKeyedServices("7tv")] SocketClient<WebSocketMessage> seven,
[FromKeyedServices("twitch")] SocketClient<TwitchWebsocketMessage> twitch,
[FromKeyedServices("veadotube")] SocketClient<object> veado,
ICommandFactory commandFactory,
ICommandManager commandManager,
IEmoteDatabase emotes,
@@ -61,6 +64,7 @@ namespace TwitchChatTTS
_obs = (obs as OBSSocketClient)!;
_seven = (seven as SevenSocketClient)!;
_twitch = (twitch as TwitchWebsocketClient)!;
_veado = (veado as VeadoSocketClient)!;
_commandFactory = commandFactory;
_commandManager = commandManager;
_emotes = emotes;
@@ -132,6 +136,15 @@ namespace TwitchChatTTS
}
});
try
{
_veado.Initialize();
await _veado.Connect();
}
catch (Exception e) {
_logger.Warning(e, "Failed to connect to Veado websocket server.");
}
try
{
await _twitch.Connect();