diff --git a/README.md b/README.md index 64b1ab7..3e5ecb2 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,10 @@ from xbotlib import Bot class EchoBot(Bot): def direct(self, message): - return self.reply(message.text, to=message.sender) + self.reply(message.text, to=message.sender) def group(self, message): - return self.reply(message.content, room=message.room) + self.reply(message.content, room=message.room) ``` And then `python echo.py`. You will be asked a few questions in order to load @@ -332,6 +332,9 @@ def serve(self, request): return self.respond(rendered) ``` +Please note the use of the `return` keyword here. The `serve` function must +return a response that will be passed to the web server. + If you want to pass data from your `direct`/`group` functions to the `serve` function, you'll need to make use of [some type of persistent storage](#persistent-storage). Your `serve` function can read from the storage