From 551f699b82c5da4656c448a2f0020d3cd36de73e Mon Sep 17 00:00:00 2001 From: Devin Collins Date: Mon, 25 Nov 2024 21:42:10 -0800 Subject: [PATCH] fix(message): perform valid check for no channel --- twitch_backend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twitch_backend.py b/twitch_backend.py index 7b2b582..237d3b8 100644 --- a/twitch_backend.py +++ b/twitch_backend.py @@ -66,6 +66,8 @@ def on_disconnect(self, conn): super().on_disconnect(conn) def get_channel_id(self, user_name: str) -> str | None: + if not user_name: + return if user_name in self.cached_channels: return self.cached_channels[user_name]