tgbotlib/src/TgBotLib/Events/ChatJoinRequestEvent.php

26 lines
681 B
PHP
Raw Normal View History

2024-11-01 15:46:47 -04:00
<?php
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatJoinRequest;
abstract class ChatJoinRequestEvent extends UpdateEvent
{
public static function getEventType(): EventType
{
return EventType::CHAT_JOIN_REQUEST_EVENT;
}
2024-11-01 18:05:02 -04:00
/**
* Retrieves the chat join request from the update.
*
* @return ChatJoinRequest The chat join request data.
*/
2024-11-01 15:46:47 -04:00
protected function getChatJoinRequest(): ChatJoinRequest
{
return $this->update->getChatJoinRequest();
}
}