Cembot is a Telegram bot written in Python. It helps people manage their debts and credits. The acronym cembot means: Collective Expenses Management BOT.
- Python 3
telepot
: a framework for Telegram Bot APIs.telepot
can be installed usingpip
.psycopg2
: a PostgreSQL adapter for Python.psycopg2
can be installed usingpip
.- a PostgreSQL running instance
- install PostgreSQL
- set up your database using
/schema.sql
- Clone this repository
- Get into it with
cd cembot
- Get your token from BotFather
- Set an environment variable with an identificator like this:
CEM_
with appended the code of the desired language. This variable must be equal to your Telegram token. For example, if you want to set up an english bot you have to digit the following command:export CEM_EN=[TOKEN]
. Note that the previous command does not make persistent your changes. If you want to you will have to add that line into.bashrc
. - Start the bot with the following command:
python main.py [db name] [db user] [db password] [db host] [language code]
Database host is 127.0.0.1 if you have installed a local PostgreSQL instance.
The code of the language is surrounded by parenthesis
- Italian (
IT
) - English (
EN
), partial
- italian instance of cembot: @it_cembot