Longman\TelegramBot\Commands\UserCommands\ImageCommand::execute PHP 메소드

execute() 공개 메소드

public execute ( )
    public function execute()
    {
        $message = $this->getMessage();
        $chat_id = $message->getChat()->getId();
        $text = $message->getText(true);
        $data = ['chat_id' => $chat_id, 'caption' => $text];
        //Return a random picture from the telegram->getUploadPath().
        return Request::sendPhoto($data, $this->ShowRandomImage($this->telegram->getUploadPath()));
    }