Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if order.city == sk:
- print(sk)
- for dk in sd:
- if order.address_latitude and order.address_longitude:
- msg = tb.send_location(dk, order.address_latitude, order.address_longitude)
- msg_id = msg.message_id
- tb.send_location(dk, order.address_latitude, order.address_longitude)
- else:
- msg_id = None
- message = tb.send_message(dk, text, reply_markup=markup,reply_to_message_id=msg_id, parse_mode='html')
- time.sleep(1)
- Вот этот кусок ниже
- if order.executor_id is None:
- time.sleep(1)
- for executor in executors:
- print(executor)
- if executor.bot_user:
- if order.address_latitude and order.address_longitude:
- msg = tb.send_location(executor.bot_user.chat_id,order.address_latitude,order.address_longitude)
- msg_id = msg.message_id
- else:
- msg_id = None
-
- message = tb.send_message(executor.bot_user.chat_id, text, reply_markup=markup,
- reply_to_message_id=msg_id, parse_mode='html')
-
- OrderMessage.objects.create(order=order, executor=executor, message_id=message.message_id,chat_id=message.chat.id)
- order.last_distribution_priority = biggest_priority
- order.last_distribution_date = now
- order.save()
- else:
- print('nice')
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement