Add support for ChosenInlineResult events

This commit is contained in:
netkas 2024-11-02 00:16:48 -04:00
parent 709e5794d5
commit a212671c49
3 changed files with 37 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\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();
}
}