Files
twitch-chat-bot/src/handlers/greetings.py
2025-04-24 17:22:06 +02:00

17 lines
375 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from twitchAPI.chat import ChatMessage
TRIGGER_AND_RESPONSE: list[tuple[str, str]] = [
# ("ку", "Ку"),
("привет", "Привет")
]
async def on_greetings(msg: ChatMessage) -> bool:
for trigger, response in TRIGGER_AND_RESPONSE:
if trigger in msg.text.lower():
await msg.reply(response)
return True
return False