Generic modular bot for Matrix (and via it irc, telegram, slack, etc..)
Go to file
Ville Ranki e26aea6f54 Added taf module 2019-12-09 20:41:30 +02:00
modules Added taf module 2019-12-09 20:41:30 +02:00
.gitignore Initial commit 2019-12-09 19:43:06 +02:00
Dockerfile Initial import, still WIP 2019-12-09 19:54:57 +02:00
LICENSE Initial commit 2019-12-09 19:43:06 +02:00
Pipfile Initial import, still WIP 2019-12-09 19:54:57 +02:00
README.md Added echo module 2019-12-09 20:24:51 +02:00
bot.py Added metar module 2019-12-09 20:38:25 +02:00
docker-compose.yml Initial import, still WIP 2019-12-09 19:54:57 +02:00

README.md

Hemppa - generic Matrix bot

Module list

Write !modulename in Matrix room where the bot is to use modules.

Echo

Simple example module that just echoes what user said. Can be used as an example for writing own modules.

First

  • Create a Matrix user
  • Get user's access token - In Riot Web see Settings / Help & about

Running on host

Run something like:

pip3 install pipenv
pipenv shell
pipenv install
MATRIX_USER="@user:matrix.org" MATRIX_ACCESS_TOKEN="MDAxOGxvYlotofcharacters53CgYAYFgo" MATRIX_SERVER="https://matrix.org" JOIN_ON_INVITE=True python3 bot.py

Running with Docker

Create .env file and set variables:

MATRIX_USER=@user:matrix.org
MATRIX_ACCESS_TOKEN=MDAxOGxvYlotofcharacters53CgYAYFgo
MATRIX_SERVER=https://matrix.org
JOIN_ON_INVITE=True

Note: without quotes!

Just run:

docker-compose up

Env variables

User, access token and server should be self-explanatory. Set JOIN_ON_INVITE to anything if you want the bot to join invites automatically.

You can set MATRIX_PASSWORD if you want to get access token. Normally you can use Riot to get it.

Testing