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