99
1010import six
1111
12+ from .utils import sjson_dumps
13+
14+
1215
1316
1417
@@ -99,7 +102,7 @@ def add_button(self, label, color=VkKeyboardColor.DEFAULT, payload=None):
99102 if payload is not None and not isinstance (payload , six .string_types ):
100103 payload = sjson_dumps (payload )
101104
102- button_type = VkKeyboardButton .TEXT
105+ button_type = VkKeyboardButton .TEXT . value
103106
104107 current_line .append ({
105108 'color' : color_value ,
@@ -126,7 +129,7 @@ def add_location_button(self, payload=None):
126129 if payload is not None and not isinstance (payload , six .string_types ):
127130 payload = sjson_dumps (payload )
128131
129- button_type = VkKeyboardButton .LOCATION
132+ button_type = VkKeyboardButton .LOCATION . value
130133
131134 current_line .append ({
132135 'action' : {
@@ -154,7 +157,7 @@ def add_vkpay_button(self, hash, payload=None):
154157 if payload is not None and not isinstance (payload , six .string_types ):
155158 payload = sjson_dumps (payload )
156159
157- button_type = VkKeyboardButton .VKPAY
160+ button_type = VkKeyboardButton .VKPAY . value
158161
159162 current_line .append ({
160163 'action' : {
@@ -190,7 +193,7 @@ def add_vkapps_button(self, app_id, owner_id, label, hash, payload=None):
190193 if payload is not None and not isinstance (payload , six .string_types ):
191194 payload = sjson_dumps (payload )
192195
193- button_type = VkKeyboardButton .VKAPPS
196+ button_type = VkKeyboardButton .VKAPPS . value
194197
195198 current_line .append ({
196199 'action' : {
0 commit comments