Add support for edited channel post events

This commit is contained in:
netkas 2024-11-03 17:15:47 -05:00
parent 325e29a930
commit 041c2dc84c
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 EditedChannelPostEvent extends UpdateEvent
{
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
{
return UpdateEventType::EDITED_CHANNEL_POST;
}
/**
* Retrieves the edited channel post from the update.
*
* @return Message The edited channel post.
*/
protected function getEditedChannelPost(): Message
{
return $this->update->getEditedChannelPost();
}
}