From 8dba6306e38b10eb4b7ba21fda481209a53c145b Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Sat, 26 Oct 2019 00:28:29 +0100 Subject: [PATCH] Add example response to message_responses.py --- message_responses.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/message_responses.py b/message_responses.py index acfd99d..0477b17 100644 --- a/message_responses.py +++ b/message_responses.py @@ -1,3 +1,4 @@ +from chat_functions import send_text_to_room import logging logger = logging.getLogger(__name__) @@ -30,4 +31,11 @@ class Message(object): async def process(self): """Process and possibly respond to the message""" - pass + if self.message_content.lower() == "hello world": + self._hello_world() + + async def _hello_world(): + """Say hello""" + text = "Hello, world!" + await send_text_to_room(self.client, self.room.room_id, text) +