diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index e4651f0..98edc3b 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -106,6 +106,11 @@ return UpdateEventType::PRE_CHECKOUT_QUERY; } + if($update->getPreCheckoutQuery() !== null) + { + return UpdateEventType::PRE_CHECKOUT_QUERY; + } + return UpdateEventType::UPDATE_EVENT; } } \ No newline at end of file diff --git a/src/TgBotLib/Enums/UpdateEventType.php b/src/TgBotLib/Enums/UpdateEventType.php index 047f9b6..bd3b279 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -12,6 +12,7 @@ use TgBotLib\Events\PaidMediaPurchasedEvent; use TgBotLib\Events\PreCheckoutQueryEvent; use TgBotLib\Events\RemovedChatBoostEvent; + use TgBotLib\Events\ShippingQueryEvent; enum UpdateEventType : string { @@ -25,4 +26,5 @@ case POLL = PollEvent::class; case PAID_MEDIA_PURCHASED = PaidMediaPurchasedEvent::class; case PRE_CHECKOUT_QUERY = PreCheckoutQueryEvent::class; + case SHIPPING_QUERY = ShippingQueryEvent::class; } diff --git a/src/TgBotLib/Events/ShippingQueryEvent.php b/src/TgBotLib/Events/ShippingQueryEvent.php new file mode 100644 index 0000000..a9e767c --- /dev/null +++ b/src/TgBotLib/Events/ShippingQueryEvent.php @@ -0,0 +1,30 @@ +update->getShippingQuery(); + } + } \ No newline at end of file