Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
Update vk_api to 11.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PaveTranquil committed Aug 17, 2019
1 parent 93f4069 commit 2e62899
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions keyboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,23 @@ def itemboard(item_name):
return json.dumps({"one_time":False, "buttons":[[{"color":"primary", "action":{"type":"text", "payload":'{"command":"add_' + item_name + '"}', "label":"Добавить в корзину ➕"}}], [{"color":"negative","action":{"type":"text","payload":"{\"command\":\"back_buy\"}","label":"Вернуться ↩"}}]]}, ensure_ascii=False)

def payboard(hash):
return json.dumps({"one_time":False, "buttons":[[{"action":{"type":"vkpay", "hash":hash}}], [{"color":"negative","action":{"type":"text","payload":"{\"command\":\"back\"}","label":"Вернуться ↩"}}]]}, ensure_ascii=False)
keyboard = VkKeyboard(False)
keyboard.add_vkpay_button(hash)
keyboard.add_line()
keyboard.add_button('Вернуться ↩', 'negative', '{"command":"back"}')
return keyboard.get_keyboard()

def donateboard(hash, app_id, id, label):
return json.dumps({"one_time":False, "buttons":[[{"action":{"type":"vkpay", "hash":hash}}], [{"action":{"type":"open_app", "app_id": app_id, "owner_id": id, "label": label}}], [{"color":"negative","action":{"type":"text","payload":"{\"command\":\"back\"}","label":"Вернуться ↩"}}]]}, ensure_ascii=False)
keyboard = VkKeyboard(False)
keyboard.add_vkapps_button(app_id, id, label, '')
keyboard.add_line()
keyboard.add_vkpay_button(hash)
keyboard.add_line()
keyboard.add_button('Вернуться ↩', 'negative', '{"command":"back"}')
return keyboard.get_keyboard()

def emptyboard():
return json.dumps({"one_time":True, "buttons":[]})
return VkKeyboard.get_empty_keyboard()


chat = chatboard(chat)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ soupsieve==1.9.1
sqlparse==0.3.0
urllib3==1.24.1
virtualenv==16.0.0
vk-api==11.4.0
vk-api==11.5.0
win-inet-pton==1.1.0
wincertstore==0.2

0 comments on commit 2e62899

Please sign in to comment.