Carlovan/inventorycatalogbot

A catalog Telegram bot for InventoryBot written in Python

★ 0Forks 0PythonGitHub ↗Compare
inventorybottelegram-bot

README

Warning

This repo was migrated to https://codeberg.org/Carlovan/inventorycatalogbot .

Second version of the @InventoryCatalogBot Telegram bot, completely rewritten from scratch.

Installation

Dependencies

To install you need

  • Python >= 3.5
  • PostgreSQL >= 9.4

Then run $ pip install -r requirements.txt to install all the python dependencies.

Database

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.

Settings

You can edit the settings inside the settings.json file.

  • token: Required. This is your bot token, you can get one from @BotFather
  • database_url: Required. This is the connection URI to your database
  • webhook: Optional. This is the URL to set the webhook to; if not set it will use the polling method
  • admin: 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.

Running

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

Contributors

Carlovan

Issues