cahat_listener.py

This commit is contained in:
2025-11-17 17:29:03 +01:00
parent 8e6bd96d44
commit 35410dec0a

View File

@@ -1,5 +1,5 @@
from twitchio.ext import commands from twitchio.ext import commands
from twitchio.models import Message import twitchio
from twitchio.web import AiohttpAdapter from twitchio.web import AiohttpAdapter
class TwitchBot(commands.Bot): class TwitchBot(commands.Bot):
@@ -31,7 +31,7 @@ class TwitchBot(commands.Bot):
"""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}")
async def event_message(self, message: Message): async def event_message(self, message: twitchio.Message):
"""Runs every time a message is sent in chat.""" """Runs every time a message is sent in chat."""
# The 'echo' check is temporarily disabled to allow self-messaging for testing. # The 'echo' check is temporarily disabled to allow self-messaging for testing.
# if message.echo: # if message.echo: