protected function displayHelpForCommand(Collection $handlers, string $command): Response
    {
        $helpRequest = clone $this->request;

        $helpRequest->text = $command;

        /** @var \Spatie\SlashCommand\Handlers $handler */
        $handler = $handlers->filter(function (HandlesSlashCommand $handler) use ($helpRequest) {
            return $handler->canHandle($helpRequest);
        })
            ->first();

        $field = AttachmentField::create($handler->getFullCommand(), $handler->getHelpDescription());

        return $this->respondToSlack('')
            ->withAttachment(
                Attachment::create()->addField($field)
            );
    }
protected function displayHelpForCommand(Collection $handlers, string $command): Response
    {
        $helpRequest = clone $this->request;

        $helpRequest->text = $command;

        /** @var \Spatie\SlashCommand\Handlers $handler */
        $handler = $handlers->filter(function (HandlesSlashCommand $handler) use ($helpRequest) {
            return $handler->canHandle($helpRequest);
        })
            ->first();

        $field = AttachmentField::create($handler->getFullCommand(), $handler->getHelpDescription());

        return $this->respondToSlack('')
            ->withAttachment(
                Attachment::create()->addField($field)
            );
    }
protected function displayHelpForCommand ( Collection $ handlers , string $ command ) : Response { $ helpRequest = clone $ this -> request ; $ helpRequest -> text = $ command ; /** @var \Spatie\SlashCommand\Handlers $handler */ $ handler = $ handlers -> filter ( function ( HandlesSlashCommand $ handler ) use ( $ helpRequest ) { return $ handler -> canHandle ( $ helpRequest ) ; } ) -> first ( ) ; $ field = AttachmentField :: create ( $ handler -> getFullCommand ( ) , $ handler -> getHelpDescription ( ) ) ; return $ this -> respondToSlack ( '' ) -> withAttachment ( Attachment :: create ( ) -> addField ( $ field ) ) ; }
Show the help information for a single SignatureHandler.

@param  Collection $handlers
@param  string $command
@return Response
Show the help information for a single SignatureHandler .