Skip to content

Commit

Permalink
remove unmaintained bot base mention and recommend echo bot repo instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Laux authored Aug 4, 2023
1 parent 6e3f049 commit 69b97de
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions development.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ For the following languages there are bindings to the C-API:
* NodeJS: [https://github.com/deltachat/deltachat-node](https://github.com/deltachat/deltachat-node)
* Golang: [https://github.com/hugot/go-deltachat](https://github.com/hugot/go-deltachat)

Additionally there are two small libraries for NodeJS that provide a higher level API to write bots:
* [deltachat-node-bot-base](https://github.com/deltachat-bot/deltachat-node-bot-base) — for writing bots (duh!),
* [deltachat-node-webbot-base](https://github.com/deltachat-bot/deltachat-node-webbot-base) — for web-interacting bots (bases on the former).
If you need a starting point for your bot look at the [echo bot](https://github.com/deltachat-bot/echo), which has examples for getting started in multiple languages. (C, go, nodejs, python, rust)

(If you language of choice misses here, please consider to write bindings to the API for it! Using FFI it shouldn't be too hard.)

Expand Down Expand Up @@ -73,22 +71,6 @@ while 1:
**Note**: the Python bindings for Delta Chat provide convenient abstractions over these events. You don't have to write code like this for a real world bot, this is only shown to explain the background.
{: .notification }

## Code example

To visualize how simple writing a Delta Chat bot can be, here's a stripped down implementation of an echo bot in NodeJS:

```javascript
const { deltachat } = require('deltachat-node-bot-base')

deltachat.start((chat, message) => {
const messageText = message.getText()
if (messageText && chat.isSingle()) {
deltachat.sendMessage(chat.getId(), `You said: ${messageText}`)
}
})
```

This code is extracted from the README of the aforementioned library [`deltachat-node-bot-base`](https://github.com/deltachat-bot/deltachat-node-bot-base). For more details and usage instructions see there.

Real world bots are [showcased in the Delta Chat forum](https://support.delta.chat/c/bots). Go ahead and look at their source code, too!
{: .notification }

0 comments on commit 69b97de

Please sign in to comment.