Giter Site home page Giter Site logo

raulpy271 / telegram_ecommerce Goto Github PK

View Code? Open in Web Editor NEW
83.0 7.0 30.0 21.4 MB

πŸ€– A telegram bot that can sell products and the salespeople can add, delete, and manage them.

License: MIT License

Python 99.44% Dockerfile 0.45% Shell 0.11%
python python-telegram-bot bot telegram mysql ecommerce telegram-ecommerce mysql-connector json chatbot

telegram_ecommerce's Introduction

πŸ€– Telegram e-commerce

This is a Telegram bot made using the Python language. To connect with the Telegram API, I use the python-telegram-bot wrapper, and on the database side, I use MySQL.

πŸ’– All Contributors

All Contributors

πŸ› οΈ TODO

  • Add a feature to change password.
  • Add salt when storing the password.
  • Add support for other languages.
  • Add password confirmation when a user buys a product.
  • The handler that adds a product in the database doesn't check if the description of the product has more characters than the description column has.
  • When the user selects the command \show_categories more than once, the bot only shows products one time.
  • Add a filter to block non-admin commands like /add_product and /add_category.

❓What can this bot do ?

This is a Telegram bot where you can buy items.

Sellers can add, delete, and manage them.

The following are instructions on how to use this bot:

  • Type /show_categories to see products by category.
  • To search for something, you can use the command /search.
  • To buy something, you need to register a password. To do this, type /register.
  • The admins can add products and categories with the commands /add_product and /add_category.

🚸 Tutorial

Register Command

Using the register command

Seeing products

Seeing products

Making a payment

Making a payment

Searching for a product

Searching a product

Changing the language

Changing the language used

βš™οΈ How to set up ?

First of all, see the dependencies in the requirements file or type pip install -r requirements.txt to install the dependencies automatically.

The second process is to create a bot with the Bot Father and get your bot token. To make test payments, you should have a token from a payment provider. Learn more about this on the Telegram payment page.

Now, put your tokens in the file /telegram_ecommerce/utils/user_credentials.json. In this file, you can put the admin's usernames and the credentials of your MySQL database. Moreover, you can change some settings in the consts.py file, like the default language.

After all, you can run the bot by typing:

 $ python bot.py

or, if you want to run the bot inside a container, use:

$ bash run.sh

πŸ“Œ PS: To run the command above Docker is needed. Installation instruction here.

πŸ›‘ Disclaimer

This project is a demo, it's only for learning purposes. To be ready for production, many features need to be added.

telegram_ecommerce's People

Contributors

raulpy271 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram_ecommerce's Issues

Docker Container

Can this project be built into a docker container so mysql-server is run per request, all requirements met etc.?

Thank you!

Can you add this feature ?

`Add an filter to block non admins commands like these: /add_product and /add_category

This is the main feature needed .... Please add it in bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.