Skip to content

Commit

Permalink
Add stop() and continue() method to abstract TelegramCommand for cont…
Browse files Browse the repository at this point in the history
…rol event propagation
  • Loading branch information
luzrain committed Jul 2, 2023
1 parent 1616ef5 commit 63f42d5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/TelegramBot/TelegramCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Luzrain\TelegramBotBundle\TelegramBot;

use Luzrain\TelegramBotApi\EventCallbackReturn;
use Luzrain\TelegramBotApi\Method;
use Luzrain\TelegramBotApi\Type;

Expand Down Expand Up @@ -39,4 +40,14 @@ protected function reply(
replyMarkup: $replyMarkup,
);
}

protected function stop(): EventCallbackReturn
{
return EventCallbackReturn::STOP;
}

protected function continue(): EventCallbackReturn
{
return EventCallbackReturn::CONTINUE;
}
}

0 comments on commit 63f42d5

Please sign in to comment.