diff --git a/src/FloppyBot.Commands.Aux.Currency/BackgroundServices/ChannelCurrencyMaintainer.cs b/src/FloppyBot.Commands.Aux.Currency/BackgroundServices/ChannelCurrencyMaintainer.cs index c9d8624..fef2249 100644 --- a/src/FloppyBot.Commands.Aux.Currency/BackgroundServices/ChannelCurrencyMaintainer.cs +++ b/src/FloppyBot.Commands.Aux.Currency/BackgroundServices/ChannelCurrencyMaintainer.cs @@ -1,9 +1,11 @@ using System.Collections.Immutable; using System.Text.Json; +using FloppyBot.Base.Configuration; using FloppyBot.Chat.Entities; using FloppyBot.Chat.Twitch.Events; using FloppyBot.Commands.Aux.Currency.Storage; using FloppyBot.Communication; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -24,12 +26,15 @@ public class ChannelCurrencyMaintainer : BackgroundService public ChannelCurrencyMaintainer( ILogger logger, INotificationReceiverFactory receiverFactory, - IChannelUserStateService channelUserStateService + IChannelUserStateService channelUserStateService, + IConfiguration configuration ) { _logger = logger; _channelUserStateService = channelUserStateService; - _receiver = receiverFactory.GetNewReceiver("CurrencyMaintainer"); + _receiver = receiverFactory.GetNewReceiver( + configuration.GetParsedConnectionString("CurrencyMaintainer") + ); _receiver.NotificationReceived += OnNotificationReceived; } diff --git a/src/FloppyBot.Commands.Executor.Agent/floppybot.json b/src/FloppyBot.Commands.Executor.Agent/floppybot.json index 7cbe552..6a55f6d 100644 --- a/src/FloppyBot.Commands.Executor.Agent/floppybot.json +++ b/src/FloppyBot.Commands.Executor.Agent/floppybot.json @@ -13,7 +13,8 @@ "CommandInput": "{Redis}|Command.Received", "ResponseOutput": "{Redis}|Message.Responded.\\{Interface\\}", "DistributedCommandRegistry": "{Redis}|FloppyBot.CommandRegistry", - "SoundCommandInvocation": "{Redis}|FloppyBot.SoundCommandInvocation" + "SoundCommandInvocation": "{Redis}|FloppyBot.SoundCommandInvocation", + "CurrencyMaintainer": "{Redis}|Message.Received" }, "Currency": { "ApiKey": "not_provided",