Add support for handling inline query events

This commit is contained in:
netkas 2024-11-02 00:18:14 -04:00
parent a212671c49
commit ac431136de
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,29 @@
<?php
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Objects\Inline\InlineQuery;
abstract class InlineQueryEvent extends UpdateEvent
{
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
{
return UpdateEventType::INLINE_QUERY;
}
/**
* New incoming inline query
*
* @return InlineQuery
*/
protected function getInlineQuery(): InlineQuery
{
return $this->update->getInlineQuery();
}
}