Warning
This repo was migrated to https://codeberg.org/Carlovan/inventorycatalogbot .
Second version of the @InventoryCatalogBot Telegram bot, completely rewritten from scratch.
To install you need
- Python >= 3.5
- PostgreSQL >= 9.4
Then run
$ pip install -r requirements.txt
to install all the python dependencies.
Create a new database inside you PostgreSQL server and leave it empty.
Then edit settings.json to set the data to access your own database.
You can edit the settings inside the settings.json file.
token: Required. This is your bot token, you can get one from @BotFatherdatabase_url: Required. This is the connection URI to your databasewebhook: Optional. This is the URL to set the webhook to; if not set it will use the polling methodadmin: Required. This is the chat_id of the first admin; this user wil be automatically added as admin by the/adinit/command.
You can also set a changelog editing the changelog.txt file.
Make sure your settings are right and the database is running, then just run
$ python main.py
Send the command /adinit with the admin user set in settings.json to initialize the database.
To stop the bot send a SIGINT pressing Crtl-C