diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index 790d40f..2886d70 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -116,6 +116,11 @@ return UpdateEventType::CALLBACK_QUERY; } + if($update->getChosenInlineResult() !== null) + { + return UpdateEventType::CHOSEN_INLINE_RESULT; + } + 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 d960ca5..789894c 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -7,6 +7,7 @@ use TgBotLib\Events\ChatBoostEvent; use TgBotLib\Events\ChatJoinRequestEvent; use TgBotLib\Events\ChatMemberUpdatedEvent; + use TgBotLib\Events\ChosenInlineResultEvent; use TgBotLib\Events\MyChatMemberUpdatedEvent; use TgBotLib\Events\PollAnswerEvent; use TgBotLib\Events\PollEvent; @@ -14,6 +15,7 @@ use TgBotLib\Events\PreCheckoutQueryEvent; use TgBotLib\Events\RemovedChatBoostEvent; use TgBotLib\Events\ShippingQueryEvent; + use TgBotLib\Objects\Inline\ChosenInlineResult; enum UpdateEventType : string { @@ -29,4 +31,5 @@ case PRE_CHECKOUT_QUERY = PreCheckoutQueryEvent::class; case SHIPPING_QUERY = ShippingQueryEvent::class; case CALLBACK_QUERY = CallbackQueryEvent::class; + case CHOSEN_INLINE_RESULT = ChosenInlineResultEvent::class; } diff --git a/src/TgBotLib/Events/ChosenInlineResultEvent.php b/src/TgBotLib/Events/ChosenInlineResultEvent.php new file mode 100644 index 0000000..cc67ab8 --- /dev/null +++ b/src/TgBotLib/Events/ChosenInlineResultEvent.php @@ -0,0 +1,29 @@ +update->getChosenInlineResult(); + } + } \ No newline at end of file