tgbotlib/src/TgBotLib/Events/ChatJoinRequestEvent.php

28 lines
767 B
PHP
Raw Normal View History

2024-11-01 15:46:47 -04:00
<?php
namespace TgBotLib\Events;
use TgBotLib\Enums\EventType;
2024-11-01 15:46:47 -04:00
use TgBotLib\Objects\ChatJoinRequest;
abstract class ChatJoinRequestEvent extends UpdateEvent
{
2024-11-03 17:28:51 -05:00
/**
* @inheritDoc
*/
public static function getEventType(): EventType
2024-11-01 15:46:47 -04:00
{
return EventType::CHAT_JOIN_REQUEST_EVENT;
2024-11-01 15:46:47 -04:00
}
2024-11-01 18:05:02 -04:00
/**
2024-11-03 17:28:51 -05:00
* A request to join the chat has been sent. The bot must have the can_invite_users
* administrator right in the chat to receive these updates.
2024-11-01 18:05:02 -04:00
*
* @return ChatJoinRequest The chat join request data.
*/
2024-11-01 15:46:47 -04:00
protected function getChatJoinRequest(): ChatJoinRequest
{
return $this->update->getChatJoinRequest();
}
}