@@ 215-227 (lines=13) @@ | ||
212 | * @param $disable_notification <i>Optional<i>. Sends the message silently. |
|
213 | * @return Message|false Message sent on success, false otherwise. |
|
214 | */ |
|
215 | public function sendPhoto(&$photo, string $reply_markup = null, string $caption = '', bool $disable_notification = false) |
|
216 | { |
|
217 | $this->_file->init($photo, 'photo'); |
|
218 | ||
219 | $this->parameters = [ |
|
220 | 'chat_id' => $this->_chat_id, |
|
221 | 'caption' => $caption, |
|
222 | 'reply_markup' => $reply_markup, |
|
223 | 'disable_notification' => $disable_notification, |
|
224 | ]; |
|
225 | ||
226 | return $this->processRequest('sendPhoto', 'Message', $this->checkCurrentFile()); |
|
227 | } |
|
228 | ||
229 | /** |
|
230 | * \brief Send an audio. |
|
@@ 273-286 (lines=14) @@ | ||
270 | * @param int $reply_to_message_id <i>Optional</i>. If the message is a reply, ID of the original message. |
|
271 | * @return Message|false Message sent on success, false otherwise. |
|
272 | */ |
|
273 | public function sendDocument(string $document, string $caption = '', string $reply_markup = null, bool $disable_notification = false, int $reply_to_message_id = null) |
|
274 | { |
|
275 | $this->_file->init($document, 'document'); |
|
276 | ||
277 | $this->parameters = [ |
|
278 | 'chat_id' => $this->_chat_id, |
|
279 | 'caption' => $caption, |
|
280 | 'reply_to_message_id' => $reply_to_message_id, |
|
281 | 'reply_markup' => $reply_markup, |
|
282 | 'disable_notification' => $disable_notification, |
|
283 | ]; |
|
284 | ||
285 | return $this->processRequest('sendDocument', 'Message', $this->checkCurrentFile()); |
|
286 | } |
|
287 | ||
288 | ||
289 | /** |