diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index 2886d70..d02e22a 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -121,6 +121,11 @@ return UpdateEventType::CHOSEN_INLINE_RESULT; } + if($update->getInlineQuery() !== null) + { + return UpdateEventType::INLINE_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 789894c..04931b7 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -8,6 +8,7 @@ use TgBotLib\Events\ChatJoinRequestEvent; use TgBotLib\Events\ChatMemberUpdatedEvent; use TgBotLib\Events\ChosenInlineResultEvent; + use TgBotLib\Events\InlineQueryEvent; use TgBotLib\Events\MyChatMemberUpdatedEvent; use TgBotLib\Events\PollAnswerEvent; use TgBotLib\Events\PollEvent; @@ -32,4 +33,5 @@ case SHIPPING_QUERY = ShippingQueryEvent::class; case CALLBACK_QUERY = CallbackQueryEvent::class; case CHOSEN_INLINE_RESULT = ChosenInlineResultEvent::class; + case INLINE_QUERY = InlineQueryEvent::class; } diff --git a/src/TgBotLib/Events/InlineQueryEvent.php b/src/TgBotLib/Events/InlineQueryEvent.php new file mode 100644 index 0000000..dd9835e --- /dev/null +++ b/src/TgBotLib/Events/InlineQueryEvent.php @@ -0,0 +1,29 @@ +update->getInlineQuery(); + } + } \ No newline at end of file