Working on: The Twitch authentication
This commit is contained in:
@@ -22,8 +22,10 @@ class TwitchBot(twitchio.Client):
|
|||||||
logger.info(f"DIAGNOSTIC: Initializing and connecting for user {self.db_user_id}...")
|
logger.info(f"DIAGNOSTIC: Initializing and connecting for user {self.db_user_id}...")
|
||||||
|
|
||||||
# The sensitive __init__ call is now inside the awaitable task.
|
# The sensitive __init__ call is now inside the awaitable task.
|
||||||
super().__init__(token=access_token, client_id=client_id, client_secret=client_secret,
|
# FIX: Do not pass client_secret/refresh_token to super().__init__.
|
||||||
refresh_token=refresh_token, initial_channels=[channel_name], ssl=True)
|
# This prevents twitchio from starting its internal web server (AiohttpAdapter) on port 4343,
|
||||||
|
# which causes "Address already in use" errors when multiple bots run.
|
||||||
|
super().__init__(token=access_token, client_id=client_id, initial_channels=[channel_name], ssl=True)
|
||||||
self.channel_name = channel_name
|
self.channel_name = channel_name
|
||||||
self.is_initialized = True
|
self.is_initialized = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user