GLaDOS/main.py

25 lines
471 B
Python
Raw Normal View History

2020-11-07 00:26:51 +01:00
#!/usr/bin/env python
import sys
import time
from threading import Thread
2020-11-08 01:41:33 +01:00
from bot import Bot
2020-11-07 00:26:51 +01:00
glados = Bot(
('irc.planet-casio.com', 6697),
2020-11-08 01:41:33 +01:00
('127.0.0.1', 5555),
["#general", "#glados"]
2020-11-07 00:26:51 +01:00
)
2020-11-08 01:41:33 +01:00
@glados.irc.on(lambda m: "Hello" in m.text)
def say_hello(msg):
glados.irc.send(msg.to, f"Nice to see you, {msg.author}")
2020-11-11 13:46:05 +01:00
@glados.v5.on(lambda c, m: True)
def announce(channels, message):
for c in channels:
glados.irc.send(c, message)
2020-11-07 00:26:51 +01:00
2020-11-08 01:41:33 +01:00
glados.start()