Added a simple method for subscribing to events.

This commit is contained in:
Tom
2025-01-07 15:42:10 +00:00
parent 64cb0c1f6d
commit b724cd00eb
4 changed files with 15 additions and 8 deletions

View File

@ -53,7 +53,7 @@ namespace TwitchChatTTS.Twitch.Redemptions
_lock = new object();
var topic = _bus.GetTopic("redemptions_initiation");
topic.Subscribe(new ServiceBusObserver(data =>
topic.Subscribe(data =>
{
if (data.Value is not RedemptionInitiation init)
return;
@ -76,7 +76,7 @@ namespace TwitchChatTTS.Twitch.Redemptions
Add(redemption);
Initialize();
}, _logger));
});
}
public void Add(RedeemableAction action)