diff --git a/README.md b/README.md index f00b25a..d46269d 100644 --- a/README.md +++ b/README.md @@ -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") @@ -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()