Spam Police

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, 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

  1. Download the bot to a folder on your computer (hopefuly obvious). You can do this easily by running
git clone
  1. Create a folder named db in the same folder as index.js
  2. In the db folder you just created, make a file called login.txt
  3. In login.txt put the login information in the following format:

login token
channel to log discovered telegram scams

For example, an account on would be

Do note that some homeservers require you to use https://matrix. before the homeserver domain.

  1. 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?
  2. Run npm install to install the node dependencies to run the bot
  3. The bot can now be launched using node index.js or node . depending on which you prefer


View Github