Handle exceptions in command and event handlers

This commit is contained in:
netkas 2024-11-05 15:42:34 -05:00
parent 12a091ce80
commit 2900b708da
3 changed files with 52 additions and 17 deletions

View file

@ -4,6 +4,7 @@
use TgBotLib\Bot;
use TgBotLib\Enums\EventType;
use TgBotLib\Exceptions\TelegramException;
use TgBotLib\Objects\Update;
abstract class UpdateEvent
@ -35,6 +36,7 @@
*
* @param Bot $bot The bot instance to be handled.
* @return void
* @throws TelegramException
*/
public abstract function handle(Bot $bot): void;
}