simplex-chat/apps/simplex-bot-advanced
spaced4ndy e05a35e26e
core: support postgres backend (#5403)
* postgres: modules structure (#5401)

* postgres: schema, field conversions (#5430)

* postgres: rework chat list pagination query (#5441)

* prepare cabal for merge

* restore cabal changes

* simplexmq

* postgres: implementation wip (tests don't pass) (#5481)

* restore ios file

* postgres: implementation - tests pass (#5487)

* refactor DB options

* refactor

* line

* style

* style

* refactor

* $

* update simplexmq

* constraintError

* handleDBErrors

* fix

* remove param

* Ok

* case

* case

* case

* comment

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-01-10 11:27:29 +00:00
..
Main.hs core: support postgres backend (#5403) 2025-01-10 11:27:29 +00: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.