new chat_listener.py
This commit is contained in:
@@ -26,7 +26,7 @@ class TwitchBot(commands.Bot):
|
|||||||
)
|
)
|
||||||
self.channel_name = channel_name
|
self.channel_name = channel_name
|
||||||
|
|
||||||
async def event_ready(self, mesage):
|
async def event_ready(self):
|
||||||
"""Called once when the bot goes online."""
|
"""Called once when the bot goes online."""
|
||||||
print(f"Listener ready for #{self.channel_name}")
|
print(f"Listener ready for #{self.channel_name}")
|
||||||
|
|
||||||
@@ -45,7 +45,5 @@ class TwitchBot(commands.Bot):
|
|||||||
|
|
||||||
# Broadcast the message to the specific user's overlay
|
# Broadcast the message to the specific user's overlay
|
||||||
# We need the user's ID to know which WebSocket connection to send to.
|
# We need the user's ID to know which WebSocket connection to send to.
|
||||||
# For now, we'll assume the bot instance is tied to a user ID.
|
user_id = self.db_user_id
|
||||||
# Let's find the user ID from the channel name.
|
|
||||||
user_id = self.owner_id
|
|
||||||
await self.websocket_manager.broadcast_to_user(user_id, chat_data)
|
await self.websocket_manager.broadcast_to_user(user_id, chat_data)
|
||||||
Reference in New Issue
Block a user