mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-31 16:40:53 +01:00
23 lines
605 B
Python
23 lines
605 B
Python
#!/usr/bin/env python
|
|
|
|
|
|
from telegram import TelegramObject
|
|
|
|
|
|
class ForceReply(TelegramObject):
|
|
def __init__(self,
|
|
force_reply=True,
|
|
selective=None):
|
|
self.force_reply = force_reply
|
|
self.selective = selective
|
|
|
|
@staticmethod
|
|
def de_json(data):
|
|
return ForceReply(force_reply=data.get('force_reply', None),
|
|
selective=data.get('selective', None))
|
|
|
|
def to_dict(self):
|
|
data = {'force_reply': self.force_reply}
|
|
if self.selective:
|
|
data['selective'] = self.selective
|
|
return data
|