Send reply to user.

@param string|null $text

@return PendingReply
161236
protected function reply(string $text = null): PendingReply
    {
        return (new PendingReply(
            context()->getChannel(),
            context()->getChat(),
            context()->getUser()
        ))->text($text);
    }
1161508
public function sendMessage($userIds, $text, $pinId = null)
    {
        return $this->send($pinId, $text, $userIds, []);
    }
937868
public function theResponseShouldContain($text)
    {
        $expectedRegexp = '/' . preg_quote($text) . '/i';
        $actual = (string) $this->response->getBody();
        Assertions::assertRegExp($expectedRegexp, $actual);
    }
356566
public function sendNd($phone, $text) {
        $params = array(
            'phone' => $phone,
            'text' => $text
        );
        return $this->master->call('messages/send_nd', $params);
    }
360782
public function sendEmail($emails, $text, $pinId = null)
    {
        return $this->send($pinId, $text, [], $emails);
    }
503634
public static function ask($text, $callback = null, $text_color = null, $bg_color = null)
    {
        if (null === $callback) {
            $callback = function() {
                return true;
            };
        }

        do {
            self::write($text, $text_color, $bg_color);
        } while (!$callback($answer = self::read()));

        return $answer;
    }
623660
public function setText(string $text)
    {
        PregHelper::assertValidUTF8(
            $text,
            RegExpException::class,
            "Regular expression error on checking source text"
        );
        $this->text = $text;
        $this->textAtCursor = null;
        $this->cursor = 0;
        return $this;
    }
54371
public function inject($text)
    {
        if (!is_string($text)) {
            return $text; // nothing to do here
        }

        foreach ($this->parameters as $key => $parameter) {
            if (strpos($text, $key) === false) {
                continue;
            }

            if (is_callable($parameter)) {
                $parameter = call_user_func($parameter);
            }

            $text = str_replace($key, $parameter, $text);
        }

        return $text;
    }
8848
private function initPayload($text)
    {
        $payload = new Payload();
        $payload->setOptions($this->getOptions());
        $payload->setQueryText($text);
        return $payload->createPayload();
    }
647483
protected function getDataFromText($text)
    {
        $data = json_decode($text, true);
        if (!is_array($data)) {
            return null;
        }
        return $data;
    }
51159
public function sentence(string $text = null): Sentence
    {
        $sentence = Sentence::factory();
        if ($text !== null) {
            $sentence->text($text);
        }

        /** @var ContainerElement $this */
        return $this->addElement($sentence);
    }
543775
public function startSpeaking($text, $optionalArgs)
    {
        return $this->proxyToInterface()->startSpeaking(
            $this->id, $text, $optionalArgs);
    }
313949
public function make(string $title = null, string $text = null): Notification
    {
        if (self::$newNotificationCache === null) {
            self::$newNotificationCache = new Notification();
        }
        $notification = clone(self::$newNotificationCache);
        if ($title !== null) {
            $notification->title = $title;
        }
        if ($text !== null) {
            $notification->text = $text;
        }
        return $notification;
    }
242052
public function setText($text)
    {
        $this->entity->setEntityName($text);
        $this->textContent->push($text);

        return $this;
    }
1189602
public function sendReply($reply, $wait = self::WAIT)
    {
        $this->getSocket()->send($reply, ($wait ? 0 : \ZMQ::MODE_DONTWAIT));
        return $this;
    }
371923
public function setText($text)
    {
        $this->template->trySet('Content', $this->app->_($text));

        return $this;
    }
731721
public function waitForText($text, $seconds = null)
    {
        $text = Arr::wrap($text);

        $message = $this->formatTimeOutMessage('Waited %s seconds for text', implode("', '", $text));

        return $this->waitUsing($seconds, 100, function () use ($text) {
            return Str::contains($this->resolver->findOrFail('')->getText(), $text);
        }, $message);
    }