Home

Awesome

tiny-matrix-bot plus

tiny-matrix-bot icon

This is a simple Matrix bot based on matrix-python-sdk with no support and no warranty. It was forked from 4nd3r/tiny-matrix-bot.

It is easy to understand, little code, and easy to set up and extend to your personal needs. It is meant for small private Matrix homeservers that are run by individuals for their friends. It is not performant and hence not suitable for industrial size roll-out.

Future

In mid-July 2020 the project was moved to this new repository and renamed to matrix-eno-bot. The reason for this move was that tiny-matrix-bot plus is based on matrix-python-sdk. Since matrix-python-sdk is no longer actively supported and end-to-end-encryption comes out of the box in matrix-nio, the switch to the Matrix SDK matrix-nio and nio-template was made.

This bot, i.e. this repo, will not be maintained. A maintained bot with similar functionality (but a bit more complexity) will be at matrix-eno-bot.

Even though unmaintained the tiny-matrix bot plus still is meaningful for beginners as-is. It is smaller and simpler than matrix-eno-bot. An easier entry point for people who just want a simple bot. But if end-to-end-encryption is a strict requirement, then head right over to matrix-eno-bot.

Installation and Setup

sudo apt install python3 python3-requests
git clone https://github.com/8go/tiny-matrix-bot
git clone https://github.com/matrix-org/matrix-python-sdk
cd tiny-matrix-bot
ln -s ../matrix-python-sdk/matrix_client
cp tiny-matrix-bot.cfg.sample tiny-matrix-bot.cfg
vim tiny-matrix-bot.cfg # adjust the config file, add token, etc.
cp tiny-matrix-bot.service /etc/systemd/system
vim /etc/systemd/system/tiny-matrix-bot.service # adjust service to your setup
systemctl enable tiny-matrix-bot
systemctl start tiny-matrix-bot
systemctl stop tiny-matrix-bot

Usage

Debugging

Run something similar to

systemctl stop tiny-matrix-bot # stop server in case it is running
cd tiny-matrix-bot # go to your installation directory
./tiny-matrix-bot.py --debug # observe debug output

Bot as personal assistent: Example bot commands provided

Bot as Admin tool: Additional bot commands provided to Matrix or system administrators

With these commands a system administrator can maintain his Matrix installation and keep a watchful eye on his server all through the Matrix bot. Set the permissions accordingly in the config file to avoid unauthorized use of these bot commands!

Other Features

Final Thoughts