From b66c5743d865bd85e5343bcbd86ce8b70d2341d0 Mon Sep 17 00:00:00 2001 From: Ash Keel Date: Mon, 10 May 2021 23:08:44 +0200 Subject: [PATCH] Hey ehm, don't allow people to redeem rewards that are disabled --- twitchbot/commands.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/twitchbot/commands.go b/twitchbot/commands.go index f2a54b9..3644ac5 100644 --- a/twitchbot/commands.go +++ b/twitchbot/commands.go @@ -65,6 +65,11 @@ func cmdRedeem(bot *TwitchBot, message irc.PrivateMessage) { continue } + // Reward not active, return early + if !reward.Enabled { + return + } + // Get user balance balance, ok := bot.Loyalty.Points[message.User.Name] if !ok {