A Matrix chat bot
Project description
chaanbot
A python 3 matrix bot using matrix-python-sdk. The bot is extensible and currently provides:
- Highlight module allows users to easily notify groups of users. E.g. "!hl javadevs spring-boot vs micronaut?" would higlight any user in the javadevs group.
- Weather module allows users to broadcast weather reports.
- More to come!
Bot is under active development and severe breaking changes should be expected until a stable release is created.
Install instructions
Install dependencies:
sudo apt-get install python3-pip python3-dev nginx
sudo pip3 install virtualenv
Add user for bot. Not required but recommended:
sudo adduser --disabled-password chaanbot
sudo su chaanbot
Create virtual environment and install bot:
python3 -m venv chaanbot
source chaanbot/bin/activate
pip3 install -r requirements.txt
python3 -m pip install --no-cache-dir --index-url https://test.pypi.org/simple/ --no-deps chaanbot
Start bot to initialize config file creation, then edit the config file to your liking. Output of running the bot will show where the config file is located:
chaanbot
nano .config/chaanbot/chaanbot.cfg
Bot should now be runnable as chaanbot user:
chaanbot
For convenience bot can be added as service. With sudo access, copy chaanbot.service file to /etc/systemd/system/chaanbot.service:
sudo nano /etc/systemd/system/chaanbot.service
Bot is now startable from systemctl:
sudo systemctl start chaanbot
And can be set to run on boot:
sudo systemctl enable chaanbot
Upgrading version
sudo su chaanbot
source /home/chaanbot/chaanbot/bin/activate
python3 -m pip install -U --index-url https://test.pypi.org/simple/ --no-deps chaanbot
TODO
- Improve error handling
- Integration tests and better test coverage
- More modules
- Improve installation documentation for non-Ubuntu 18.04 installations :-)
- Use Poetry for dependency management?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for chaanbot-0.0.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5094e3f4a452a2b0b57a16ccf693faacd42bca9a64d18efb8ee0596a3e48797 |
|
MD5 | 540e1f96044bdcdb64835a8492d22dee |
|
BLAKE2b-256 | 35d9c14601039c5025da77eb5a99b967e83136a9a620497f1a2c2e9d91acf9f6 |