From bcbb742b9f454c036f0fa0c303d1d711272fa4a9 Mon Sep 17 00:00:00 2001 From: Netkas Date: Mon, 24 Apr 2023 19:22:06 -0400 Subject: [PATCH] Added class `\TgBotLib\Objects\Telegram\InlineQueryResult` which is the base class for all inline query results, additionally added `\TgBotLib\Abstracts\InlineQueryResultType` to represent the type of inline query result object. https://git.n64.cc/nosial/libs/tgbot/-/issues/3 --- CHANGELOG.md | 1 + .../Abstracts/InlineQueryResultType.php | 81 +++++++++++++++++++ .../Objects/Telegram/InlineQueryResult.php | 80 ++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 src/TgBotLib/Abstracts/InlineQueryResultType.php create mode 100644 src/TgBotLib/Objects/Telegram/InlineQueryResult.php diff --git a/CHANGELOG.md b/CHANGELOG.md index bf0ef48..4651044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ input objects for methods that require input objects. * Added object `\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVenue`, see [InlineQueryResultVenue](https://core.telegram.org/bots/api#inlinequeryresultvenue) for more information. * Added object `\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultContact`, see [InlineQueryResultContact](https://core.telegram.org/bots/api#inlinequeryresultcontact) for more information. * Added object `\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultGame`, see [InlineQueryResultGame](https://core.telegram.org/bots/api#inlinequeryresultgame) for more information. + * Added class `\TgBotLib\Objects\Telegram\InlineQueryResult` which is the base class for all inline query results, additionally added `\TgBotLib\Abstracts\InlineQueryResultType` to represent the type of inline query result object. ### Changed * Refactored InputMessageContent types to its own namespace so InputMessageContent can always return the correct InputMessageContent object type when calling `fromArray()` diff --git a/src/TgBotLib/Abstracts/InlineQueryResultType.php b/src/TgBotLib/Abstracts/InlineQueryResultType.php new file mode 100644 index 0000000..773c980 --- /dev/null +++ b/src/TgBotLib/Abstracts/InlineQueryResultType.php @@ -0,0 +1,81 @@ +