| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function execute() |
||
| 35 | { |
||
| 36 | $message = $this->getMessage(); |
||
| 37 | $chat_id = $message->getChat()->getId(); |
||
| 38 | $text = $message->getText(true); |
||
| 39 | |||
| 40 | $data = [ |
||
| 41 | 'chat_id' => $chat_id, |
||
| 42 | 'caption' => $text, |
||
| 43 | ]; |
||
| 44 | |||
| 45 | //Return a random picture from the telegram->getUploadPath(). |
||
| 46 | return Request::sendPhoto($data, $this->ShowRandomImage($this->telegram->getUploadPath())); |
||
| 47 | } |
||
| 63 |