diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index d02e22a..d8baf8c 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -126,6 +126,11 @@ return UpdateEventType::INLINE_QUERY; } + if($update->getMessageReactionCount() !== null) + { + return UpdateEventType::MESSAGE_REACTION_COUNT; + } + 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 04931b7..d31098f 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -9,6 +9,7 @@ use TgBotLib\Events\ChatMemberUpdatedEvent; use TgBotLib\Events\ChosenInlineResultEvent; use TgBotLib\Events\InlineQueryEvent; + use TgBotLib\Events\MessageReactionCountEvent; use TgBotLib\Events\MyChatMemberUpdatedEvent; use TgBotLib\Events\PollAnswerEvent; use TgBotLib\Events\PollEvent; @@ -34,4 +35,5 @@ case CALLBACK_QUERY = CallbackQueryEvent::class; case CHOSEN_INLINE_RESULT = ChosenInlineResultEvent::class; case INLINE_QUERY = InlineQueryEvent::class; + case MESSAGE_REACTION_COUNT = MessageReactionCountEvent::class; } diff --git a/src/TgBotLib/Events/MessageReactionCountEvent.php b/src/TgBotLib/Events/MessageReactionCountEvent.php new file mode 100644 index 0000000..c8ccfb3 --- /dev/null +++ b/src/TgBotLib/Events/MessageReactionCountEvent.php @@ -0,0 +1,31 @@ +update->getMessageReactionCount(); + } + } \ No newline at end of file