mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #577 from rmed/master
Add check for parse_mode in BaseInlineQueryResultCached
This commit is contained in:
commit
2d6c2a345f
@ -1584,6 +1584,7 @@ class BaseInlineQueryResultCached(JsonSerializable):
|
|||||||
self.caption = None
|
self.caption = None
|
||||||
self.reply_markup = None
|
self.reply_markup = None
|
||||||
self.input_message_content = None
|
self.input_message_content = None
|
||||||
|
self.parse_mode = None
|
||||||
self.payload_dic = {}
|
self.payload_dic = {}
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
@ -1600,6 +1601,8 @@ class BaseInlineQueryResultCached(JsonSerializable):
|
|||||||
json_dict['reply_markup'] = self.reply_markup.to_dic()
|
json_dict['reply_markup'] = self.reply_markup.to_dic()
|
||||||
if self.input_message_content:
|
if self.input_message_content:
|
||||||
json_dict['input_message_content'] = self.input_message_content.to_dic()
|
json_dict['input_message_content'] = self.input_message_content.to_dic()
|
||||||
|
if self.parse_mode:
|
||||||
|
json_dict['parse_mode'] = self.parse_mode
|
||||||
return json.dumps(json_dict)
|
return json.dumps(json_dict)
|
||||||
|
|
||||||
|
|
||||||
@ -1615,8 +1618,8 @@ class InlineQueryResultCachedPhoto(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['photo_file_id'] = photo_file_id
|
self.payload_dic['photo_file_id'] = photo_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedGif(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedGif(BaseInlineQueryResultCached):
|
||||||
@ -1631,8 +1634,8 @@ class InlineQueryResultCachedGif(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['gif_file_id'] = gif_file_id
|
self.payload_dic['gif_file_id'] = gif_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedMpeg4Gif(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedMpeg4Gif(BaseInlineQueryResultCached):
|
||||||
@ -1647,8 +1650,8 @@ class InlineQueryResultCachedMpeg4Gif(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['mpeg4_file_id'] = mpeg4_file_id
|
self.payload_dic['mpeg4_file_id'] = mpeg4_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedSticker(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedSticker(BaseInlineQueryResultCached):
|
||||||
@ -1674,8 +1677,8 @@ class InlineQueryResultCachedDocument(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['document_file_id'] = document_file_id
|
self.payload_dic['document_file_id'] = document_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedVideo(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedVideo(BaseInlineQueryResultCached):
|
||||||
@ -1690,8 +1693,8 @@ class InlineQueryResultCachedVideo(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['video_file_id'] = video_file_id
|
self.payload_dic['video_file_id'] = video_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedVoice(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedVoice(BaseInlineQueryResultCached):
|
||||||
@ -1705,8 +1708,8 @@ class InlineQueryResultCachedVoice(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['voice_file_id'] = voice_file_id
|
self.payload_dic['voice_file_id'] = voice_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
class InlineQueryResultCachedAudio(BaseInlineQueryResultCached):
|
class InlineQueryResultCachedAudio(BaseInlineQueryResultCached):
|
||||||
@ -1718,8 +1721,8 @@ class InlineQueryResultCachedAudio(BaseInlineQueryResultCached):
|
|||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
self.input_message_content = input_message_content
|
self.input_message_content = input_message_content
|
||||||
|
self.parse_mode = parse_mode
|
||||||
self.payload_dic['audio_file_id'] = audio_file_id
|
self.payload_dic['audio_file_id'] = audio_file_id
|
||||||
self.payload_dic['parse_mode'] = parse_mode
|
|
||||||
|
|
||||||
|
|
||||||
# Games
|
# Games
|
||||||
|
Loading…
Reference in New Issue
Block a user