From dfadf92742bb1d656ec48c118e9dbcb79d507074 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 9 Nov 2018 09:14:03 +0100 Subject: [PATCH] Update InlineQueryResultArticle Inherit from InlineQueryResult --- .../types/bots/inline_query_result_article.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyrogram/client/types/bots/inline_query_result_article.py b/pyrogram/client/types/bots/inline_query_result_article.py index 82f64a04..a6f14edb 100644 --- a/pyrogram/client/types/bots/inline_query_result_article.py +++ b/pyrogram/client/types/bots/inline_query_result_article.py @@ -17,9 +17,10 @@ # along with Pyrogram. If not, see . from pyrogram.api import types +from .inline_query_result import InlineQueryResult -class InlineQueryResultArticle: +class InlineQueryResultArticle(InlineQueryResult): """Represents a link to an article or web page. Args: @@ -64,11 +65,12 @@ class InlineQueryResultArticle: url: str = None, hide_url: bool = None, description: str = None, - thumb_url: str = "", + thumb_url: str = None, thumb_width: int = 0, thumb_height: int = 0 ): - self.id = id + super().__init__("article", id) + self.title = title self.input_message_content = input_message_content self.reply_markup = reply_markup @@ -82,7 +84,7 @@ class InlineQueryResultArticle: def write(self): return types.InputBotInlineResult( id=self.id, - type="article", + type=self.type, send_message=self.input_message_content.write(self.reply_markup), title=self.title, description=self.description, @@ -97,6 +99,5 @@ class InlineQueryResultArticle: h=self.thumb_height ) ] - ) if self.thumb_url else None, - content=None + ) if self.thumb_url else None )