/Pizza_delivery

Pizza shop with delivery

Primary LanguagePythonMIT LicenseMIT

Pizza delivery bot

The project was created for sales and delivery via telegram bot with CMS Moltin.

Working bot: @pizza_dzya_bot

Bot in work

Tg example

Installation

  1. Python3 should already be installed.

  2. It is recommended to use virtualenv/venv to isolate the project.

  3. Use pip (or pip3, there is a conflict with Python2) to install the dependencies:

pip install -r requirements.txt
  1. Register store on Moltin, get store id, client id, client secret and add them to file .env under the names MOLT_STORE_ID, MOLT_CLIENT_ID, MOLT_CLIENT_SECRET. Warn: they will interview you before registering.

  2. To work with Telegram you need:

    • Enable VPN if the messenger is blocked in your country;
    • Get bot token and put it in .env under the name TG_BOT_TOKEN, more about that here;
    • Get payment token for bot from @botfather and put it in .env under name TG_BOT_PAYMENT_TOKEN
    • Get bot token for the bot logger required to track bot errors. Put it in .env under the name TG_LOG_BOT_TOKEN.
    • Get bot token for deliveryman bot. Put it in .env under the name TG_DELIVERY_BOT_TOKEN.
    • Get your id from @userinfobot and put in .env as TG_CHAT_ID
  3. Get a free database on redislabs.com, get the host, port and password from the database and put them in .env under the names DB_HOST, DB_PORT and DB_PASSWORD.

  4. Run the file tg_bot.py.

Project goals

This code is written for educational purposes on the online course for web developers dvmn.org.