Add example response to message_responses.py
This commit is contained in:
parent
6f47000988
commit
8dba6306e3
1 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue