A matrix bot to monitor and respond to investment scam spamming across the matrix platform, for example in rooms with a permanently offline admin.
How to add the bot to a room
You can use the instance of the bot I host,
@anti-spam:matrix.org or you can selfhost below. Do note that the bot does not currently support encrypted rooms.
You can invite the bot account to a room, the bot is set up to auto accept invites if it is online.
You can run
+invite [room alias or id]in a room that the bot is in and if it is able to join the room it will.
How to selfhost:
This assumes you have an up to date node and npm installed. On debian based systems (including ubuntu, pop!os, and linux mint) you can run
sudo apt install node npm and on arch based systems (including manjaro) you can run
sudo pacman -S node npm
- Download the bot to a folder on your computer (hopefuly obvious). You can do this easily by running
git clone https://github.com/jjj333-p
- Create a folder named
dbin the same folder as
- In the
dbfolder you just created, make a file called
login.txtput the login information in the following format:
homeserver login token channel to log discovered telegram scams
For example, an account on matrix.org would be
https://matrix.org [redacted] !xWGMKuBpJrtGDSfmaF:matrix.org
Do note that some homeservers require you to use https://matrix. before the homeserver domain.
- In the same folder as index.js make an empty textfile called bot.json. This appears to be how the matrix bot sdk saves the sync token and stuff, however it seems to work just fine if I delete this so maybe the code could be changed around to not require it?
- Run npm install to install the node dependencies to run the bot
- The bot can now be launched using node index.js or node . depending on which you prefer