This commit is contained in:
behruz-dev
2025-09-07 21:18:46 +05:00
parent 25b885e111
commit e56bf49321
4 changed files with 25 additions and 7 deletions

View File

@@ -7,11 +7,13 @@ from config.env import env
token = env.str("BOT_TOKEN")
@shared_task
def send_orders_to_tg_bot(chat_id, product_name, quantity):
def send_orders_to_tg_bot(chat_id, product_name, quantity, first_name, last_name):
url = f"https://api.telegram.org/bot{token}/sendMessage"
message = (
f"✅ Товар: {product_name}\n"
f"🛒 Кол-во: {quantity}\n"
f"🛒 Кол-во: {quantity}\n\n"
f"Имя: {first_name} {last_name}"
)
payload = {
"chat_id": chat_id,