Added a simple method for subscribing to events.
This commit is contained in:
@ -66,18 +66,18 @@ namespace TwitchChatTTS.Hermes.Socket
|
||||
_lock = new object();
|
||||
|
||||
var ttsCreateUserVoice = _bus.GetTopic("tts.user.voice.create");
|
||||
ttsCreateUserVoice.Subscribe(new ServiceBusObserver(async data => await Send(3, new RequestMessage()
|
||||
ttsCreateUserVoice.Subscribe(async data => await Send(3, new RequestMessage()
|
||||
{
|
||||
Type = "create_tts_user",
|
||||
Data = (IDictionary<string, object>) data.Value!
|
||||
}), logger));
|
||||
}));
|
||||
|
||||
var ttsUpdateUserVoice = _bus.GetTopic("tts.user.voice.update");
|
||||
ttsUpdateUserVoice.Subscribe(new ServiceBusObserver(async data => await Send(3, new RequestMessage()
|
||||
ttsUpdateUserVoice.Subscribe(async data => await Send(3, new RequestMessage()
|
||||
{
|
||||
Type = "update_tts_user",
|
||||
Data = (IDictionary<string, object>) data.Value!
|
||||
}), logger));
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user