Add support for CallbackQuery events.
This commit is contained in:
parent
e843c8ca4f
commit
709e5794d5
3 changed files with 35 additions and 0 deletions
28
src/TgBotLib/Events/CallbackQueryEvent.php
Normal file
28
src/TgBotLib/Events/CallbackQueryEvent.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Events;
|
||||
|
||||
use TgBotLib\Abstracts\UpdateEvent;
|
||||
use TgBotLib\Enums\UpdateEventType;
|
||||
use TgBotLib\Objects\CallbackQuery;
|
||||
|
||||
abstract class CallbackQueryEvent extends UpdateEvent
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getEventType(): UpdateEventType
|
||||
{
|
||||
return UpdateEventType::CALLBACK_QUERY;
|
||||
}
|
||||
|
||||
/**
|
||||
* New incoming callback query
|
||||
*
|
||||
* @return CallbackQuery
|
||||
*/
|
||||
protected function getCallbackQuery(): CallbackQuery
|
||||
{
|
||||
return $this->update->getCallbackQuery();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue