SimpleX-Chat/apps/simplex-bot-advanced
Alexander Bondarenko 3e29c664ac
core: remote host/controller types (#3104)
* Start sprinkling ZoneId everywhere

* Draft zone/satellite/host api

* Add zone dispatching

* Add command relaying handler

* Parse commands and begin DB

* Implement discussed things

* Resolve some comments

* Resolve more stuff

* Make bots ignore remoteHostId from queues

* Fix tests and stub more

* Untangle cmd relaying

* Resolve comments

* Add more http2 client funs

* refactor, rename

* rename

* remove empty tests

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-09-27 09:41:02 +01:00
..
Main.hs core: remote host/controller types (#3104) 2023-09-27 09:41:02 +01:00
README.md apps: update chat bots, readme (#1928) 2023-02-14 07:57:27 +00:00

Advanced SimpleX Chat bot example

In most cases a simple REPL bot is sufficient, but in cases you want to program more advanced communication scenarios you may take a more complex event-based approach, as in this example.

Event-based approach allows you:

  • decide whether to connect to a user or not depending on any factors, e.g. user display name.
  • disconnect from users who send too many messages or send messages that bot finds inappropriate.
  • react to message deletions and editing.
  • process reply messages differently, taking the original message into account.
  • process and send images and voice messages.
  • create groups of users, e.g. to connect 2 users.
  • etc.