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