Troubleshooting db_user_id statement
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user