This repository has been archived on 2024-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
xbotlib/examples/echo.py
2021-01-10 15:05:44 +01:00

18 lines
356 B
Python

from xbotlib import Bot
class EchoBot(Bot):
"""SYN/ACK bot for testing things work.
Just direct message the bot and see if you get back what you sent. If so,
then you know your setup is working.
"""
def react(self, message):
"""Send back what we get."""
self.reply(to=message.sender, body=message.body)
EchoBot()