Reputation: 11
I expected the field to disappear from the user interface, but it remains How do I remove the field for input field?
def handle_message(sender_id):
message = KeyboardMessage(keyboard=create_menu())
viber_api.send_messages(sender_id, [message])
def create_menu():
keyboard = {
"Type": "keyboard",
"InputFieldState": "hidden",
"Buttons": [
{
"Columns": 2,
"Rows": 1,
"BgColor": "#e6f5ff",
"Text": "<b>Button 1</b>",
"TextSize": "large",
"TextVAlign": "middle",
"TextHAlign": "center",
"ActionType": "reply",
"ActionBody": "button1",
"Silent": True
},
],
}
return keyboard
I expected the keyboard to disappear from the user interface, but it remains
Upvotes: 0
Views: 53
Reputation: 11
I should have added the argument min_api_version=6 to KeyboardMessage
message = KeyboardMessage(keyboard=create_menu(), min_api_version=6)
Upvotes: 0