Fix echo examples and list them all too
This commit is contained in:
parent
f6d9fbc39c
commit
a1479ed62f
@ -15,13 +15,16 @@ from xbotlib import Bot
|
|||||||
|
|
||||||
class EchoBot(Bot):
|
class EchoBot(Bot):
|
||||||
def react(self, msg):
|
def react(self, msg):
|
||||||
self.reply(f"echo: {msg}")
|
self.reply(to=message.sender, body=message.body)
|
||||||
|
|
||||||
MyBot()
|
MyBot()
|
||||||
```
|
```
|
||||||
|
|
||||||
And then `python echo.py`.
|
And then `python echo.py`.
|
||||||
|
|
||||||
## API
|
## More Examples
|
||||||
|
|
||||||
TODO.
|
- **[EchoBot](./examples/echo.py)**: Sends back what you sent it
|
||||||
|
- **[WhisperBot](./examples/whisper.py)**: Pseudo-anonymous whispering in group chats
|
||||||
|
|
||||||
|
See the [examples](./examples/) directoy for all listings.
|
||||||
|
@ -2,10 +2,9 @@ from xbotlib import Bot
|
|||||||
|
|
||||||
|
|
||||||
class EchoBot(Bot):
|
class EchoBot(Bot):
|
||||||
"""SYN/ACK bot for testing things work.
|
"""Gives back what you sent it.
|
||||||
|
|
||||||
Just direct message the bot and see if you get back what you sent. If so,
|
Just direct message the bot and see if you get back what you sent.
|
||||||
then you know your setup is working.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user