Added Veadotube integration
This commit is contained in:
13
TTS.cs
13
TTS.cs
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user