python-telegram-bot/telegram/replykeyboardhide.py

24 lines
638 B
Python
Raw Normal View History

2015-07-09 03:33:13 +02:00
#!/usr/bin/env python
2015-07-12 15:39:11 +02:00
from .replymarkup import ReplyMarkup
2015-07-09 03:33:13 +02:00
class ReplyKeyboardHide(ReplyMarkup):
def __init__(self,
hide_keyboard=True,
selective=None):
self.hide_keyboard = hide_keyboard
self.selective = selective
@staticmethod
def de_json(data):
return ReplyKeyboardHide(hide_keyboard=data.get('hide_keyboard', None),
selective=data.get('selective', None))
def to_dict(self):
data = {'hide_keyboard': self.hide_keyboard}
2015-07-09 03:33:13 +02:00
if self.selective:
data['selective'] = self.selective
return data