27 lines
No EOL
604 B
PHP
27 lines
No EOL
604 B
PHP
<?php
|
|
|
|
namespace TgBotLib\Events;
|
|
|
|
use TgBotLib\Enums\EventType;
|
|
use TgBotLib\Objects\Message;
|
|
|
|
abstract class ChannelPostEvent extends UpdateEvent
|
|
{
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public static function getEventType(): EventType
|
|
{
|
|
return EventType::CHANNEL_POST;
|
|
}
|
|
|
|
/**
|
|
* Retrieves the current channel post.
|
|
*
|
|
* @return Message The channel post message.
|
|
*/
|
|
protected function getChannelPost(): Message
|
|
{
|
|
return $this->update->getChannelPost();
|
|
}
|
|
} |