Swapping mapping for websocket return traffic
This commit is contained in:
@@ -2,8 +2,9 @@ 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):
|
||||
def __init__(self, access_token: str, client_id: str, client_secret: str, bot_id: str, channel_name: str, websocket_manager, owner_id: int):
|
||||
self.websocket_manager = websocket_manager
|
||||
self.owner_id = owner_id
|
||||
|
||||
# Configure the internal web adapter to use a non-standard, high port
|
||||
# to avoid conflicts during development and hot-reloading.
|
||||
|
||||
@@ -30,7 +30,8 @@ class ListenerManager:
|
||||
client_id=settings.TWITCH_CLIENT_ID,
|
||||
client_secret=settings.TWITCH_CLIENT_SECRET,
|
||||
bot_id=user.platform_user_id,
|
||||
websocket_manager=websocket_manager
|
||||
websocket_manager=websocket_manager,
|
||||
owner_id=user.id
|
||||
)
|
||||
task = asyncio.create_task(bot.start())
|
||||
self.active_listeners[user.id] = task
|
||||
|
||||
Reference in New Issue
Block a user