Do you want to set up your own DeltaChat bot??? It is really easy, read on.
- An email account for the bot.
- GNU/Linux 64bit machine (can be installed in other systems but you will need to compile DeltaChat’s core yourself but that isn’t covered in this tutorial)
- 500MB of RAM or more (a bot with few users use less than 100MB of RAM)
- Python >=3.6
- Declare bot address and password (Optional just to make this tutorial easier):
$ ADDRfirstname.lastname@example.org' $ PASSWORD='myPassword'
- Create and activate virtual environment (Optional but recommended):
$ python3 -m venv ~/.venvs/`echo $ADDR|tr "@" "_"` $ source ~/.venvs/`echo $ADDR|tr "@" "_"`/bin/activate $ pip3 install -U pip wheel
- Install deltachat’s python bindings:
$ pip3 install -U -i https://m.devpi.net/dc/master deltachat
- Install simplebot:
$ git clone https://github.com/simplebot-inc/simplebot $ pip3 install ./simplebot
- Install some plugins:
$ git clone https://github.com/simplebot-inc/simplebot_plugins $ python3 simplebot_plugins/scripts/install_plugin.py
- Configure bot:
$ simplebot --basedir ~/bots/`echo $ADDR|tr "@" "_"` init $ADDR "$PASSWORD"
- Start the bot:
$ simplebot --basedir ~/bots/`echo $ADDR|tr "@" "_"` serve
And that is all, now your have your very own delta-bot! go to your DeltaChat app and write a message:
/help to your bot’s address to check it is working!
It is very cheap to run a bot, so you can repeat this steps in the same machine with another email account and have several bots, I recommend to have 250-500MB of RAM per bot if it will be a public bot.