Advertisement
Guest User

123123123123123123123123124124

a guest
Aug 18th, 2020
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.83 KB | None | 0 0
  1.  if order.city == sk:
  2.                     print(sk)
  3.                     for dk in sd:
  4.                         if order.address_latitude and order.address_longitude:
  5.                             msg = tb.send_location(dk, order.address_latitude, order.address_longitude)
  6.                             msg_id = msg.message_id
  7.                             tb.send_location(dk, order.address_latitude, order.address_longitude)
  8.                         else:
  9.                             msg_id = None
  10.                         message = tb.send_message(dk, text, reply_markup=markup,reply_to_message_id=msg_id, parse_mode='html')
  11.                     time.sleep(1)
  12. Вот этот кусок ниже                
  13. if order.executor_id is None:
  14.                     time.sleep(1)
  15.                     for executor in executors:
  16.                         print(executor)
  17.                         if executor.bot_user:
  18.                             if order.address_latitude and order.address_longitude:
  19.                                 msg = tb.send_location(executor.bot_user.chat_id,order.address_latitude,order.address_longitude)
  20.                                 msg_id = msg.message_id
  21.                             else:
  22.                                 msg_id = None
  23.                             message = tb.send_message(executor.bot_user.chat_id, text, reply_markup=markup,
  24.                                                   reply_to_message_id=msg_id, parse_mode='html')
  25.                             OrderMessage.objects.create(order=order, executor=executor, message_id=message.message_id,chat_id=message.chat.id)
  26.                     order.last_distribution_priority = biggest_priority
  27.                     order.last_distribution_date = now
  28.                     order.save()
  29.                 else:
  30.                     print('nice')
  31.             time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement