@@ -101,7 +101,7 @@ def add_button(self, label, color=VkKeyboardColor.DEFAULT, payload=None):
101101 current_line .append ({
102102 'color' : color_value ,
103103 'action' : {
104- 'type' : 'text' ,
104+ 'type' : VkKeyboardButton . TEXT ,
105105 'payload' : payload ,
106106 'label' : label ,
107107 }
@@ -117,7 +117,7 @@ def add_location_button(self, payload=None):
117117 current_line = self .lines [- 1 ]
118118
119119 if len (current_line ) != 0 :
120- raise ValueError ('A button of type Location occupies the entire line of the keyboard, besides it on the line of buttons cannot be. ' )
120+ raise ValueError ('This type of button takes the entire width of the line' )
121121
122122 if payload is not None and not isinstance (payload , six .string_types ):
123123 payload = sjson_dumps (payload )
@@ -141,7 +141,7 @@ def add_vkpay_button(self, hash, payload=None):
141141 current_line = self .lines [- 1 ]
142142
143143 if len (current_line ) != 0 :
144- raise ValueError ('A button of type VKPay occupies the entire line of the keyboard, besides it on the line of buttons cannot be. ' )
144+ raise ValueError ('This type of button takes the entire width of the line' )
145145
146146 if payload is not None and not isinstance (payload , six .string_types ):
147147 payload = sjson_dumps (payload )
@@ -172,7 +172,7 @@ def add_vkapps_button(self, app_id, owner_id, label, hash, payload=None):
172172 current_line = self .lines [- 1 ]
173173
174174 if len (current_line ) != 0 :
175- raise ValueError ('A button of type VKApps occupies the entire line of the keyboard, besides it on the line of buttons cannot be. ' )
175+ raise ValueError ('This type of button takes the entire width of the line' )
176176
177177 if payload is not None and not isinstance (payload , six .string_types ):
178178 payload = sjson_dumps (payload )
@@ -196,4 +196,4 @@ def add_line(self):
196196 if len (self .lines ) >= 10 :
197197 raise ValueError ('Max 10 lines' )
198198
199- self .lines .append ([])
199+ self .lines .append ([])
0 commit comments