From 62a57bc818c50beb679352b4b43fc3c5349e7bdf Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 17 Jul 2022 00:30:05 +0200 Subject: [PATCH] fix: don't try to register messages to redis if the redis connection isn't configured --- PluralKit.Bot/Services/CommandMessageService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluralKit.Bot/Services/CommandMessageService.cs b/PluralKit.Bot/Services/CommandMessageService.cs index 568af21b..5ef84ad1 100644 --- a/PluralKit.Bot/Services/CommandMessageService.cs +++ b/PluralKit.Bot/Services/CommandMessageService.cs @@ -20,6 +20,8 @@ public class CommandMessageService public async Task RegisterMessage(ulong messageId, ulong channelId, ulong authorId) { + if (_redis.Connection == null) return; + _logger.Debug( "Registering command response {MessageId} from author {AuthorId} in {ChannelId}", messageId, authorId, channelId