This commit is contained in:
behruz-dev
2025-09-10 17:02:57 +05:00
parent 19432574d9
commit 236e6c0b1e
2 changed files with 3 additions and 4 deletions

View File

@@ -7,13 +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, first_name, last_name):
def send_orders_to_tg_bot(chat_id, product_name, quantity, username):
url = f"https://api.telegram.org/bot{token}/sendMessage"
message = (
f"✅ Товар: {product_name}\n"
f"🛒 Кол-во: {quantity}\n\n"
f"Имя: {first_name} {last_name}"
f"Имя: {username}"
)
payload = {
"chat_id": chat_id,