From c3ecb75d6cb4f6f09e921c20c97ed553dc43bc73 Mon Sep 17 00:00:00 2001 From: Netkas Date: Sun, 23 Apr 2023 20:40:53 -0400 Subject: [PATCH] Added constructors to InlineQuery objects --- .../InlineQueryResult/InlineQueryResultArticle.php | 8 ++++++++ .../Telegram/InlineQueryResult/InlineQueryResultAudio.php | 8 ++++++++ .../Telegram/InlineQueryResult/InlineQueryResultGif.php | 8 ++++++++ .../InlineQueryResult/InlineQueryResultMpeg4Gif.php | 8 ++++++++ .../Telegram/InlineQueryResult/InlineQueryResultPhoto.php | 8 ++++++++ .../Telegram/InlineQueryResult/InlineQueryResultVideo.php | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultArticle.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultArticle.php index dad65c1..03f3733 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultArticle.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultArticle.php @@ -69,6 +69,14 @@ */ private $thumbnail_height; + /** + * InlineQueryResultArticle constructor. + */ + public function __construct() + { + $this->type = 'article'; + } + /** * Type of the result, must be article * diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultAudio.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultAudio.php index 3d73208..efe8e1a 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultAudio.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultAudio.php @@ -70,6 +70,14 @@ */ private $input_message_content; + /** + * InlineQueryResultAudio constructor. + */ + public function __construct() + { + $this->type = 'audio'; + } + /** * Type of the result, must be audio * diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultGif.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultGif.php index 5840569..a91bbd8 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultGif.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultGif.php @@ -88,6 +88,14 @@ */ private $input_message_content; + /** + * InlineQueryResultGif constructor. + */ + public function __construct() + { + $this->type = 'gif'; + } + /** * Type of the result, must be gif * diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultMpeg4Gif.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultMpeg4Gif.php index b3fbf0a..9c383c2 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultMpeg4Gif.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultMpeg4Gif.php @@ -85,6 +85,14 @@ */ private $input_message_content; + /** + * InlineQueryResultMpeg4Gif constructor. + */ + public function __construct() + { + $this->type = 'mpeg4_gif'; + } + /** * Type of the result, must be mpeg4_gif * diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultPhoto.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultPhoto.php index 694e0f5..201b81b 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultPhoto.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultPhoto.php @@ -80,6 +80,14 @@ */ private $input_message_content; + /** + * InlineQueryResultPhoto constructor. + */ + public function __construct() + { + $this->type = 'photo'; + } + /** * Type of the result, must be photo * diff --git a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultVideo.php b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultVideo.php index d273538..c5c579e 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultVideo.php +++ b/src/TgBotLib/Objects/Telegram/InlineQueryResult/InlineQueryResultVideo.php @@ -91,6 +91,14 @@ */ private $input_message_content; + /** + * InlineQueryResultVideo constructor. + */ + public function __construct() + { + $this->type = 'video'; + } + /** * Type of the result, must be video *