A bot for moderated XMPP channels, offering voice for Lightning donations
Go to file
2024-06-12 17:08:36 +02:00
lib Remove debug log 2023-11-22 21:14:44 +01:00
samples Add documentation 2024-02-12 14:04:58 +01:00
.gitignore Add documentation 2024-02-12 14:04:58 +01:00
index.js Fix function context for scheduled reauth 2024-06-12 17:08:36 +02:00
LICENSE Add license 2023-11-30 16:58:41 +01:00
package-lock.json Update dependencies 2024-06-12 17:07:58 +02:00
package.json Add documentation 2024-02-12 14:04:58 +01:00
README.md Update README 2024-06-12 17:08:02 +02:00

XMPP Lightning Anti-Spam

In order to combat spam in public chat rooms, they can be configured so that new, unknown participants have to request voice before being able to write messages (known as a "moderated channel").

This bot listens to those voice requests, and when it sees one, it sends a direct message to the user, which offers to give them voice immediately, in exchange for a small amount of sats1, payable via the Lightning Network2.


  • Node.js and NPM
  • An XMPP account, which has admin permissions for the channels you want it to manage voice requests in
  • A hosted Lightning Network account compatible with LndHub clients (e.g. a Kosmos or Alby account, or self-hosted with lndhub.go).


Clone this repository:

git clone https://gitea.kosmos.org/raucao/xmpp-lightning-antispam.git

Install required dependencies:

npm install

Create a config file from the included sample:

cp samples/config.js config.js

Edit the config file using your favorite editor:

vim config.js

Start the program:

npm start


Set up as described above, or use a cloud platform instead.

An example for a systemd service can be found in samples/xmpp-lightning-antispam.service.


E-Mail, Chat, Social, Lightning: raucao@kosmos.org

  1. Sats are the smallest unit of bitcoin (1 sat = 0.00000001 BTC) ↩︎

  2. The Lightning Network is a peer-to-peer network for instantly and very cheaply sending and receiving bitcoin directly between nodes ↩︎