Add support for deleted business messages event

This commit is contained in:
netkas 2024-11-02 00:24:18 -04:00
parent b4a7d69c3c
commit 775a5ab71f
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,29 @@
<?php
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Objects\BusinessMessagesDeleted;
abstract class DeletedBusinessMessagesEvent extends UpdateEvent
{
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
{
return UpdateEventType::DELETED_BUSINESS_MESSAGES;
}
/**
* Messages were deleted from a connected business account
*
* @return BusinessMessagesDeleted
*/
protected function getBusinessMessagesDeleted(): BusinessMessagesDeleted
{
return $this->update->getDeletedBusinessMessages();
}
}