From ea63e26e88985c3eb7f38c4344fee4ade3c165f5 Mon Sep 17 00:00:00 2001 From: Thomas Erlang Date: Tue, 27 Feb 2024 15:28:47 +0100 Subject: [PATCH] Make sure tier is lowercase --- tbot/twitch_bot/modlog.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tbot/twitch_bot/modlog.py b/tbot/twitch_bot/modlog.py index e79d36a..dc42c14 100644 --- a/tbot/twitch_bot/modlog.py +++ b/tbot/twitch_bot/modlog.py @@ -134,7 +134,7 @@ async def log_sub(self, data): user_id, user, data['sub_message'].get('message'), - data['sub_plan'], + data['sub_plan'].lower(), gifter_id, gifter_user, data['is_gift'], @@ -146,15 +146,15 @@ async def log_sub(self, data): '1000': 'Tier 1 Sub', '2000': 'Tier 2 Sub', '3000': 'Tier 3 Sub', - 'Prime': 'Prime Sub', + 'prime': 'Prime Sub', } if not data['is_gift']: if message: message = f': {message}' - message = f'{user} subscribed with a {tiers.get(data["sub_plan"], "unknown")} ({data["cumulative_months"]}){message}' + message = f'{user} subscribed with a {tiers.get(data["sub_plan"].lower(), "unknown")} ({data["cumulative_months"]}){message}' else: - message = f'{gifter_user} gifted a {tiers.get(data["sub_plan"], "unknown")} to {user}' + message = f'{gifter_user} gifted a {tiers.get(data["sub_plan"].lower(), "unknown")} to {user}' await self.db.execute(''' INSERT INTO twitch_chatlog (type, created_at, channel_id, user, user_id, message) VALUES