Move UpdateEvent to Events and remove unused import
This commit is contained in:
parent
24fe2f2b91
commit
646c77c4ba
27 changed files with 4 additions and 28 deletions
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Abstracts;
|
||||
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\EventType;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Objects\Update;
|
||||
|
||||
abstract class UpdateEvent
|
||||
{
|
||||
protected Update $update;
|
||||
|
||||
/**
|
||||
* Constructor for the class.
|
||||
*
|
||||
* @param Update $update The update instance to be used.
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Update $update)
|
||||
{
|
||||
$this->update = $update;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the event type.
|
||||
* @return EventType The event type of the current instance.
|
||||
*/
|
||||
public static function getEventType(): EventType
|
||||
{
|
||||
return EventType::UPDATE_EVENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract method to handle the bot instance.
|
||||
*
|
||||
* @param Bot $bot The bot instance to be handled.
|
||||
* @return void
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public abstract function handle(Bot $bot): void;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue