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 16:51:20 +01:00

17 lines
323 B
Python

from xbotlib import Bot
class EchoBot(Bot):
"""Gives back what you sent it.
Just direct message the bot and see if you get back what you sent.
"""
def reply_direct_chat(self, message):
"""Send back what we get."""
self.send_direct_chat(to=message.sender, body=message.body)
EchoBot()