toby/app/Domain/Slack/Handlers/SaySomething.php
Adrian Hopek fad4290cc3 wip
2022-04-22 12:41:00 +02:00

24 lines
557 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Domain\Slack\Handlers;
use Spatie\SlashCommand\Request;
use Spatie\SlashCommand\Response;
use Spatie\SlashCommand\Handlers\SignatureHandler;
class SaySomething extends SignatureHandler
{
protected $signature = "toby powiedz {zdanie}";
protected $description = "Powiedz zdanie";
public function handle(Request $request): Response
{
$sentence = $this->getArgument("zdanie");
return $this->respondToSlack($sentence)
->displayResponseToEveryoneOnChannel();
}
}