Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 2.8 KB

README.md

File metadata and controls

47 lines (34 loc) · 2.8 KB

Church-Bot

This is a bot for ChurchTools written in Python. It uses redis for caching and directly accesses the ChurchTools-API.

Try it out on Telegram!

Features

  • 👥 New: Easily sign up for events and get your QR Code to check in (currently Beta)
  • 👤 Information about people, search using name/phone number
  • ⛪ Information about current room reservations
  • 📆 Information about current calendar entries
  • 🎵 Search and download songs
  • 👥 Information about groups
  • 🎂 Show current birthdays

Getting Started

In any case you need a telegram bot:

  1. Create a Telegram Bot using the BotFather
  2. Get your token, which looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

The preferred method is using Docker, but manually is also pretty easy.

Docker

  1. Download the docker-compose.yml
  2. Enter you token in BOT_TOKEN
  3. Start it using docker-compose up -d

Manually

  1. Install and start redis
  2. Install the requirements (preferably in a virtualenv): pip3 install -r requirements.txt
  3. Set the environment variable (e.g. using export) BOT_TOKEN=..
  4. Start the bot: python3 churchbot.py
  5. Talk to your bot on Telegram

Developer Information

This bot uses python-telegram-bot.

The ChurchTools-API is currently undergoing major changes. Some functions are still only available via the old ?q=church{module}/ajax format, e.g. ?q=churchdb/ajax. These rather poorly documented and often require tracking the Ajax calls and guessing the meaning of the parameters. Other functions use the new api/ and are documented in the official reference.

The code is not particularly readable or documented. Especially the entry function is quite a mess. This could be restructured to a more Object Oriented style using base and derived classes. An example for this is the implementation of bookings and calendar. Because they share several functions these are provided in a base class.

Feel free to open issues and pull requests are welcome!

Disclaimer

This bot is an unoffical project and in no way related to the ChurchTools Innovations GmbH. By using this bot you agress to the terms & conditions of ChurchTools at https://www.church.tools/en/agb. By connecting it to a specific installation you also agree to the terms & conditions and to the privacy policy of the owner of that installation.

The code is licensed under the Mozilla Public License 2.0. Please see LICENSE for more informtion.