Python implementation of a telegram bot to access the Chaosdorf's Mete
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Markus 5e07eec58d Add alert for negative account balance 2 years ago
.gitignore Implement system with one initial admin and linking of telegram and mete ids via this admin 3 years ago
Pipfile Use a config file instead of environment variables (closes #4) 2 years ago
Pipfile.lock Use a config file instead of environment variables (closes #4) 2 years ago
README.md Add a README 2 years ago
dockerfile Use Pipenv for managing dependencies (closes #5) 2 years ago
run.py Add alert for negative account balance 2 years ago

README.md

telemete

access your Mete account with a Telegram bot

development

Simply clone this repository, run pipenv install --dev and you're good to go.

deployment

You can use the prebuilt Docker image or build it yourself.

configuration

You'll need a config file. It looks like this:

[mete_connection]
base_url = "http://mete/" # the URL of your Mete instance - please use HTTPS

[initial_admin] # information about the initial administrator
telegram_id = 1234 # can be obtained from t.me/userinfobot or @userinfobot on Telegram
telegram_handle = "foo"
mete_id = 5678

Please put the path to this config file in the environment variable CONFIG_FILE.

Additionally, there are two secret keys you can configure:

  • API_KEY (required): the key from Telegram's botfather
  • SENTRY_DSN (recommended): the key for the project in Sentry

Both can be given either using Docker's mechanism for secrets (prefix them with TELEMETE_) or as environment variables.

Sidenote: This bot requires all administrators to have a user handle on telegram for the purpose of users easily contacting them. So make sure only users with handles get promoted.