From 24872809eb8f185174593d5429797d28f2085395 Mon Sep 17 00:00:00 2001 From: Thomas Erlang Date: Wed, 28 Feb 2024 18:10:49 +0100 Subject: [PATCH] The message is actually already just json --- tbot/twitch_bot/modlog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tbot/twitch_bot/modlog.py b/tbot/twitch_bot/modlog.py index 70e3a02..0bce9de 100644 --- a/tbot/twitch_bot/modlog.py +++ b/tbot/twitch_bot/modlog.py @@ -21,11 +21,11 @@ async def parse_message(self, message): elif message['type'] == 'RECONNECT': await self.ws.close() elif message['type'] == 'MESSAGE': - m = json.loads(message['data']['message']) if message['data']['topic'].startswith('chat_moderator_actions'): + m = json.loads(message['data']['message']) await self.log_mod_action(message['data']['topic'], m['data']) elif message['data']['topic'].startswith('channel-subscribe-events-v1'): - await self.log_sub(m['message']) + await self.log_sub(message['data']['message']) async def log_mod_action(self, topic, data): if 'moderation_action' not in data: