Advertisement
DimaDevelop

Untitled

Oct 15th, 2022
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. photo = vk.method('photos.getMessagesUploadServer')
  2.     res = requests.post(photo['upload_url'], files={'photo': open('qresult.png', 'rb')}).json()
  3.     save = vk.method('photos.saveMessagesPhoto', {'photo': res['photo'], 'server': res['server'], 'hash': res['hash']})[0]
  4.     result = 'photo{}_{}'.format(save['owner_id'], save['id'])
  5.     msg_edit(vk, event, "результат:", result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement