Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

๐Ÿ›’ ํ…”๋ ˆ๊ทธ๋žจ ์‡ผํ•‘๋ชฐ ๋ด‡ ํ…œํ”Œ๋ฆฟ

๋น„์ฆˆ๋‹ˆ์Šค ๋ฐ ๊ธˆ์œต

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

What you can do

  • /start - needed to start the bot and choose the mode (user/admin).
  • /menu - go to the menu.
  • /sos - ask the administrator a question.

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original

ShopBot

This is an example Telegram shop bot. It's a simple and, most importantly, efficient way to place an order without leaving your favorite messenger.

What can it do?

  1. /start - needed to start the bot and choose the mode (user/admin).

  2. /menu - go to the menu.

  3. /sos - ask the administrator a question.

Menu

The user menu looks like this:

User Menu

Catalog

The catalog consists of products sorted by categories. Users can add items to their cart, and the admin has full control over catalog management (addition/removal).

Cart

The ordering process looks like this: the user goes to the ๐Ÿ›๏ธ Catalog, selects the desired category, chooses products, and clicks the ๐Ÿ›’ Cart button.


Then, after making sure everything is in place, proceed to checkout by clicking ๐Ÿ“ฆ Place Order.

Add a Product

To add a product, select a category and click the โž• Add Product button. Then, fill out the "name-description-image-price" form and confirm.

Contacting Administration

To ask the admin a question, simply select the /sos command. There is a limit on the number of questions.

sos

Get started

  1. Clone this repository.

  2. Create and activate virtual enviroment:

Windows:

python -m venv venv
& venv/scripts/activate.ps1

UNIX:

python3 -m venv venv
source venv/scripts/activate
  1. Install the requirements:
pip install -r requirements.txt
  1. Create and populate .env file in the root directory. Here are the required keys (* - always required; ** - required only in production):
Key Value
BOTTOKEN (*_) To get bot token, you need create a bot via BotFather.
PROJECTNAME (**_) Name of your project on Heroku (required if you want to deploy bot on Heroku).
WEBHOOKHOST, WEBHOOK_PATH (**_) Webhook host and path.
ADMINS (**) A comma-separated string of admins IDs (e.g., 000000000,123456789). To get your Telegram ID, use Get My ID bot.

Example:

BOT_TOKEN=YOUR_BOT_TOKEN
ADMINS=123456789,000000000
  1. Run app.py:
python3 app.py

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ