From 5f8db3124c5bb9b491bf0e0c719d22202667b620 Mon Sep 17 00:00:00 2001 From: Alex B Date: Wed, 28 Apr 2021 10:38:18 +0300 Subject: [PATCH] Add Bot API 5.2 support --- src/Types/InlineQuery.php | 11 ++++++----- src/Types/Message.php | 2 ++ src/Types/VoiceChatScheduled.php | 7 +++++++ 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 src/Types/VoiceChatScheduled.php diff --git a/src/Types/InlineQuery.php b/src/Types/InlineQuery.php index 09f9746..d151a16 100644 --- a/src/Types/InlineQuery.php +++ b/src/Types/InlineQuery.php @@ -8,9 +8,10 @@ class InlineQuery extends Type { 'location' => Location::class ]; - public $id; - public $from; - public $location; - public $query; - public $offset; + public string $id; + public User $from; + public string $query; + public string $offset; + public ?Location $location = null; + public ?string $chat_type = null; } diff --git a/src/Types/Message.php b/src/Types/Message.php index 81571d0..ef6d42d 100644 --- a/src/Types/Message.php +++ b/src/Types/Message.php @@ -36,6 +36,7 @@ class Message extends Type { 'poll' => Poll::class, 'message_auto_delete_timer_changed' => MessageAutoDeleteTimerChanged::class, 'proximity_alert_triggered' => ProximityAlertTriggered::class, + 'voice_chat_scheduled' => VoiceChatScheduled::class, 'voice_chat_started' => VoiceChatStarted::class, 'voice_chat_ended' => VoiceChatEnded::class, 'voice_chat_participants_invited' => VoiceChatParticipantsInvited::class, @@ -93,6 +94,7 @@ class Message extends Type { public ?string $connected_website = null; public ?PassportData $passport_data = null; public ?ProximityAlertTriggered $proximity_alert_triggered = null; + public ?VoiceChatScheduled $voice_chat_scheduled = null; public ?VoiceChatStarted $voice_chat_started = null; public ?VoiceChatEnded $voice_chat_ended = null; public ?VoiceChatParticipantsInvited $voice_chat_participants_invited = null; diff --git a/src/Types/VoiceChatScheduled.php b/src/Types/VoiceChatScheduled.php new file mode 100644 index 0000000..7f3fc5f --- /dev/null +++ b/src/Types/VoiceChatScheduled.php @@ -0,0 +1,7 @@ +