From 6520ea0b63325225e10080130cb948dc8967a878 Mon Sep 17 00:00:00 2001 From: ramforth Date: Mon, 17 Nov 2025 16:25:00 +0100 Subject: [PATCH] Troubleshooting db_user_id statement --- chat_listener.py | 5 +++-- listener_manager.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chat_listener.py b/chat_listener.py index 6d498df..063c246 100644 --- a/chat_listener.py +++ b/chat_listener.py @@ -2,9 +2,10 @@ from twitchio.ext import commands from twitchio.web import AiohttpAdapter class TwitchBot(commands.Bot): - def __init__(self, access_token: str, client_id: str, client_secret: str, bot_id: str, channel_name: str, websocket_manager, owner_id: int): + def __init__(self, access_token: str, client_id: str, client_secret: str, bot_id: str, channel_name: str, websocket_manager, db_user_id: int): self.websocket_manager = websocket_manager - self.owner_id = owner_id + # Store our application's database user ID to avoid conflict with twitchio's internal 'owner_id' + self.db_user_id = db_user_id # Configure the internal web adapter to use a non-standard, high port # to avoid conflicts during development and hot-reloading. diff --git a/listener_manager.py b/listener_manager.py index c264fe1..41b376f 100644 --- a/listener_manager.py +++ b/listener_manager.py @@ -31,7 +31,7 @@ class ListenerManager: client_secret=settings.TWITCH_CLIENT_SECRET, bot_id=user.platform_user_id, websocket_manager=websocket_manager, - owner_id=user.id + db_user_id=user.id ) task = asyncio.create_task(bot.start()) self.active_listeners[user.id] = task