Skip to content

Commit

Permalink
fixed configuration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rGunti committed Aug 3, 2024
1 parent 275f5e7 commit 7407f3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -24,12 +26,15 @@ public class ChannelCurrencyMaintainer : BackgroundService
public ChannelCurrencyMaintainer(
ILogger<ChannelCurrencyMaintainer> logger,
INotificationReceiverFactory receiverFactory,
IChannelUserStateService channelUserStateService
IChannelUserStateService channelUserStateService,
IConfiguration configuration
)
{
_logger = logger;
_channelUserStateService = channelUserStateService;
_receiver = receiverFactory.GetNewReceiver<ChatMessage>("CurrencyMaintainer");
_receiver = receiverFactory.GetNewReceiver<ChatMessage>(
configuration.GetParsedConnectionString("CurrencyMaintainer")
);
_receiver.NotificationReceived += OnNotificationReceived;
}

Expand Down
3 changes: 2 additions & 1 deletion src/FloppyBot.Commands.Executor.Agent/floppybot.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7407f3e

Please sign in to comment.