Add support for edited business messages

This commit is contained in:
netkas 2024-11-02 00:27:17 -04:00
parent 775a5ab71f
commit b40ee01d6e
3 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,28 @@
<?php
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Objects\Message;
abstract class EditedBusinessMessageEvent extends UpdateEvent
{
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
{
return UpdateEventType::EDITED_BUSINESS_MESSAGE;
}
/**
* New incoming edited business message
*
* @return Message
*/
protected function getEditedBusinessMessage(): Message
{
return $this->update->getEditedBusinessMessage();
}
}