Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Mar 29, 2024
1 parent 7aa1b98 commit 28bf9f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pip install deltabot-cli
Example echo-bot written with deltabot-cli:

```python
from deltabot_cli import BotCli, events
from deltachat2 import MsgData, events
from deltabot_cli import BotCli

cli = BotCli("echobot")

Expand All @@ -31,7 +32,7 @@ def log_event(bot, accid, event):
@cli.on(events.NewMessage)
def echo(bot, accid, event):
msg = event.msg
bot.rpc.misc_send_text_message(accid, msg.chat_id, msg.text)
bot.rpc.send_msg(accid, msg.chat_id, MsgData(text=msg.text))

if __name__ == "__main__":
cli.start()
Expand Down

0 comments on commit 28bf9f0

Please sign in to comment.