Skip to content

Add All event

Compare
Choose a tag to compare
@Mateodioev Mateodioev released this 10 May 03:44
· 11 commits to v3 since this release

If you want to receive all event types with a single event handler you can use Mateodioev\TgHandler\Events\Types\AllEvent

use Mateodioev\TgHandler\Events\Types\AllEvent;
use Mateodioev\Bots\Telegram\Api;
use Mateodioev\TgHandler\Context;

class AllHandler extends AllEvent
{
    public function execute(Api $bot, Context $context, array $args = [])
    {
        // Put your logic here
    }
}

// Register event
$bot->onEvent(new AllHandler);

See more in examples/All.php

Full Changelog: v3.4.0...v3.4.02