Skip to content

Releases: Mateodioev/telegram-bot-handler

Add middleware params

10 Nov 03:33
Compare
Choose a tag to compare

Add temporary conversations

05 Apr 22:32
Compare
Choose a tag to compare
  • Delete method handle
  • Add ttl to conversation

Not compatible with release v5.1
Full Changelog: v5.1...v5.4-beta

Use stable release of mateodiev/tgbot

09 Oct 16:14
Compare
Choose a tag to compare
  • Add methods EventInterface::api and EventInterface::ctx
  • Deprecated method handle in commands
  • Add exception Mateodioev\TgHandler\BotException as base exception
  • Incompatible with v5.0.1

Full Changelog: v5.0.1...v5.1

Add event filters

02 Aug 22:22
Compare
Choose a tag to compare

Now you can use custom filters for you events as attributes

Full Changelog: v3.5.0...v4.1.1

Add support for params in commands

25 Jun 21:12
Compare
Choose a tag to compare

Now you can format you commands with regex pattern

Example:

use Mateodioev\Bots\Telegram\Api;
use Mateodioev\TgHandler\Context;
use Mateodioev\TgHandler\Commands\MessageCommand;

class Start extends MessageCommand {
    protected string $name = 'info';
    protected string $params = '{w:id}';
    
    public function handle(Api $bot, Context $context, array $args = []) {
        $id = $this->param('id', 'default id'); // get the param
    }
}

// This command now only works with this format: "/info myId"

Full Changelog: v3.4.04...v3.5.0

Fixed regex on commands event

08 Jun 19:42
Compare
Choose a tag to compare

change . for [\s\S] in regex builder

Full Changelog: v3.4.04...v3.4.05

Minor changes

08 Jun 17:10
Compare
Choose a tag to compare

Implementations of isValid method has been simplefied

Full Changelog: v3.4.03...v3.4.04

Minor changes

15 May 21:31
Compare
Choose a tag to compare

Add All event

10 May 03:44
Compare
Choose a tag to compare

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

Update logger

19 Apr 04:08
Compare
Choose a tag to compare

Now you can use logger levels

Full Changelog: v3.3.1...v3.4.0