From fdda47da7ba872a566fbc3e339e49a685b4122d3 Mon Sep 17 00:00:00 2001 From: ramforth Date: Mon, 17 Nov 2025 18:22:12 +0100 Subject: [PATCH] remove AIOhttp --- chat_listener.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/chat_listener.py b/chat_listener.py index fbeb156..34adde1 100644 --- a/chat_listener.py +++ b/chat_listener.py @@ -1,27 +1,22 @@ 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, db_user_id: int): self.websocket_manager = websocket_manager # 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. - adapter = AiohttpAdapter(host="localhost", port=8123) super().__init__( token=access_token, - # Add the adapter first to ensure priority - web_server_adapter=adapter, prefix='!', # A prefix is required but won't be used for reading chat initial_channels=[channel_name], # These are now required by twitchio client_id=client_id, client_secret=client_secret, # The 'bot_id' is the Twitch ID of the user account the bot is running as - bot_id=bot_id, id=bot_id + bot_id=bot_id, id=bot_id, + # Explicitly disable the internal web server to prevent all port conflicts. + eventsub_url=None ) self.channel_name = channel_name