Add support for handling inline query events
This commit is contained in:
parent
a212671c49
commit
ac431136de
3 changed files with 36 additions and 0 deletions
29
src/TgBotLib/Events/InlineQueryEvent.php
Normal file
29
src/TgBotLib/Events/InlineQueryEvent.php
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue