Longman\TelegramBot\Commands\AdminCommands\SendtochannelCommand::executeNoDb PHP Method

executeNoDb() public method

Execute without db
public executeNoDb ( ) : mixed
return mixed
    public function executeNoDb()
    {
        $message = $this->getMessage();
        $chat_id = $message->getChat()->getId();
        $text = trim($message->getText(true));
        $data = ['chat_id' => $chat_id, 'text' => 'Usage: ' . $this->getUsage()];
        if ($text !== '') {
            $channels = (array) $this->getConfig('your_channel');
            $first_channel = $channels[0];
            $data['text'] = $this->publish(new Message($message->getRawData(), $this->telegram->getBotName()), $first_channel);
        }
        return Request::sendMessage($data);
    }