2015-07-09 02:15:46 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
2015-08-09 00:09:24 +02:00
|
|
|
from .replymarkup import ReplyMarkup
|
2015-07-09 02:15:46 +02:00
|
|
|
|
|
|
|
|
2015-08-09 00:09:24 +02:00
|
|
|
class ForceReply(ReplyMarkup):
|
2015-07-09 02:58:13 +02:00
|
|
|
def __init__(self,
|
|
|
|
force_reply=True,
|
|
|
|
selective=None):
|
|
|
|
self.force_reply = force_reply
|
|
|
|
self.selective = selective
|
2015-07-09 02:15:46 +02:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def de_json(data):
|
|
|
|
return ForceReply(force_reply=data.get('force_reply', None),
|
|
|
|
selective=data.get('selective', None))
|
|
|
|
|
2015-07-20 04:25:44 +02:00
|
|
|
def to_dict(self):
|
2015-07-20 04:06:04 +02:00
|
|
|
data = {'force_reply': self.force_reply}
|
2015-07-09 02:15:46 +02:00
|
|
|
if self.selective:
|
2015-07-20 04:06:04 +02:00
|
|
|
data['selective'] = self.selective
|
|
|
|
return data
|