Add support for ChosenInlineResult events
This commit is contained in:
parent
709e5794d5
commit
a212671c49
3 changed files with 37 additions and 0 deletions
29
src/TgBotLib/Events/ChosenInlineResultEvent.php
Normal file
29
src/TgBotLib/Events/ChosenInlineResultEvent.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\ChosenInlineResult;
|
||||
|
||||
abstract class ChosenInlineResultEvent extends UpdateEvent
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getEventType(): UpdateEventType
|
||||
{
|
||||
return UpdateeventType::CHOSEN_INLINE_RESULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the chosen inline result from the current update.
|
||||
*
|
||||
* @return ChosenInlineResult The chosen inline result associated with the current update.
|
||||
*/
|
||||
protected function getChosenInlineResult(): ChosenInlineResult
|
||||
{
|
||||
return $this->update->getChosenInlineResult();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue