Skip to main content

Delta.Chat bot to reply to incoming messages in groups or 1:1 chats

Project description

A simple example “deltabot” that receives and sends messages for an e-mail account. It will reply to messages to it by echoing them back. It works as part of a group or in 1:1 chats in https://delta.chat applications (or even with regular email) and will also reply to regular e-mails. Deltabot supports Autocrypt end-to-end encryption but note that the operator of the “bot” service can look into messages that are sent to it.

install

To install make sure you have the python deltachat-bindings installed, at best in a virtualenv environment . Then install the bot:

pip install deltabot

starting the bot

First you need to provide an emailaddress and a password to allow the bot to receive and send messages for that address:

deltabot init email@example.org password123

This command will try to contact the imap/smtp servers for example.org and logging in with the given e-mail address and password. Once this successfully completes, initialization is done and tested.

You can then let the bot listen continously:

deltabot serve

It will listen for incoming messages and reply to each of them.

To see some action install https://delta.chat and add your bot-email address as a contact and start chatting with it! You can also add the bot as a member to a group chat.

Looking at the code

Checkout this file which contains the definition of a command line client used above, and its interaction with the bindings (src/deltabot/cmdline.py):

https://github.com/deltachat/deltabot/blob/master/src/deltabot/cmdline.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deltabot-0.6.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

deltabot-0.6.0-py2.py3-none-any.whl (17.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file deltabot-0.6.0.tar.gz.

File metadata

  • Download URL: deltabot-0.6.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: devpi-server/4.7.1 (py2.7.13; linux2)

File hashes

Hashes for deltabot-0.6.0.tar.gz
Algorithm Hash digest
SHA256 4947d11066b44e164ffdef6c5e457941953eaaffb520a6816320cad3a5f9edc7
MD5 f6468728554c2c81b31177e206c179f3
BLAKE2b-256 5e9b1f8d6130e35c628fc80babcd859aa79d62aa5bfe374cc9508df5f891eb76

See more details on using hashes here.

File details

Details for the file deltabot-0.6.0-py2.py3-none-any.whl.

File metadata

  • Download URL: deltabot-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: devpi-server/4.7.1 (py2.7.13; linux2)

File hashes

Hashes for deltabot-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6cd9e84ee03931a0bac9155f79623a97c84ea1534ea9dd146727f71230a78a88
MD5 6b3ae16207fe8c057b552462dc5afc08
BLAKE2b-256 3b84d8965660b89531d29c67765c8477e5c3eb1496d6ce2d81b7f15b47bc1900

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page