Use new attributes
This commit is contained in:
parent
42e01862f8
commit
cdfa98d47b
|
@ -48,11 +48,9 @@ Here's the code for the `EchoBot`.
|
|||
```python
|
||||
class EchoBot(Bot):
|
||||
def direct(self, message):
|
||||
self.reply(message.body, to=message.sender)
|
||||
|
||||
self.reply(message.text, to=message.sender)
|
||||
def group(self, message):
|
||||
if "echobot" in message.body:
|
||||
self.reply(message.body.split(":")[-1], room=message.room)
|
||||
self.reply(message.content, room=message.room)
|
||||
```
|
||||
|
||||
Read more in the [API reference](#api-reference) for how to write your own bots.
|
||||
|
|
Loading…
Reference in New Issue